如何从以下响应的标题中提取“位置”的参数?
HTTP/1.1 301 Moved Permanently
Cache-Control: max-age=0, no-cache, no-store, must-revalidate
Content-Encoding: gzip
Expires: Mon, 11 Jan 2016 13:41:03 GMT
Last-Modified: Mon, 11 Jan 2016 13:41:03 GMT
Location: hffffer.aspx?GcgvR25kUEPovjjFC8Tv6TErQhGyPEV/aCtmW0wQB76YRC5ShAy/e624URjHnt65zVa8eQCkiOPyB3zIzcKbBhVKSJabVf8z3uqAVKO7tdl8cbHjSQ+/dsTKgxXiuw0B12fhOvPj/pVURdGivisByA==
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Mon, 11 Jan 2016 13:41:03 GMT
Content-Length: 0
答案 0 :(得分:1)
使用以下正则表达式提取器配置:
Response Headers
location
Location: (.*)
$1$
在必要时将提取的值称为${location}
。
如果您的请求中有重定向,您可能还需要将“应用于”广播更改为Main sample and sub-samples
。
参考文献: