开发者

How to escape double quotes in a WCAT scenario file?

开发者 https://www.devze.com 2023-03-05 00:02 出处:网络
Using WCAT 6.3, I\'d like to set an http header exactly like this including the double quotes a开发者_如何学Goround the ETag:

Using WCAT 6.3, I'd like to set an http header exactly like this including the double quotes a开发者_如何学Goround the ETag:

If-None-Match: "a52391cbf838cd1:0"

How do I escape the double quotes in the scenario file? This is the snippet from my scenario file that is not working:

request
{
  url = "/css/navigation.css";
  setheader
  {
    name  = "If-None-Match";
    value = ""a52391cbf838cd1:0"";
  }
  statuscode = 304;
}


WCAT is based in C and the scenario file uses some of the C syntax including its escape character. The correct syntax is:

  setheader
  {
    name  = "If-None-Match";
    value = "\"a52391cbf838cd1:0\"";
  }
0

精彩评论

暂无评论...
验证码 换一张
取 消