2

使用 WCAT 6.3,我想设置一个完全像这样的 http 标头,包括 ETag 周围的双引号:

If-None-Match: "a52391cbf838cd1:0"

如何转义场景文件中的双引号?这是我的场景文件中不起作用的片段:

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

1 回答 1

3

WCAT 基于 C 语言,场景文件使用一些 C 语法,包括其转义字符。正确的语法是:

  setheader
  {
    name  = "If-None-Match";
    value = "\"a52391cbf838cd1:0\"";
  }
于 2011-06-13T16:18:38.927 回答