使用 FireBug 嗅探相关候选者我通常有这个响应头:
Response Headersview source
Cache-Control no-cache, no-store
Content-Length 0
Date Fri, 08 Mar 2013 13:22:37 GMT
Expires Thu, 01 Jan 1970 00:00:00 GMT
Location http://c24jbs300014.test.local:8080/something/someotherthing/171330/considertakingadump?24
Pragma no-cache
Server Apache-Coyote/1.1
在上面的响应标头中,我将值 24 关联起来,如下所示:
web_reg_save_param_ex(
"ParamName=correlationID",
"LB=considertakingadump?",
"RB=",
SEARCH_FILTERS,
"Scope=Headers",
LAST);
它被拾起,它可以像这样在脚本中关联:
web_submit_data("submitit",
"Action=http://c29jbsl00015.test.local:8080/something/treatment/{someothercorrelatedvalue}/someotherstuff?{correlationID}-1.IBehaviorListener.0-tabbedPanel-content-panels-0-panel-tableBody-somepoint-0-somepoint-somepoint-somepoint",
"Method=POST",
"RecContentType=text/xml",
"Referer=http://c29jbsl00015.test.local:8080/something/treatment/{someothercorrelatedvalue}/someotherstuff?9",
"Snapshot=t63.inf",
"Mode=HTTP",
ITEMDATA,
"Name=valgtBeslutning", "Value=0", ENDITEM,
LAST);
但是,当查看日志(扩展为参数替换)时,我发现很多响应是构造 URL 的一部分,如下所示:
Action.c(618): Redirecting "http://c29jbsl00015.test.local:8080/something/treatment/171334/considerit?24&10Content-Length:+0HTTP/1.1+200+OKServer:+Apache-Coyote/1.1Date:+Fri,+08+Mar+2013+13:27:35+GMTExpires:+Thu,+01+Jan+1970+00:00:00+GMTPragma:+no-cacheCache-Control:+no-cache,+no-storeContent-Type:+text/html%3Bcharset=UTF-8Transfer-Encoding:+chunked-1.ILinkListener-nesteContent-Length:+0HTTP/1.1+200+OKServer:+Apache-Coyote/1.1Date:+Fri,+08+Mar+2013+13:27:35+GMTExpires:+Thu,+01+Jan+1970+00:00:00+GMTPragma:+no-cacheCache-Control:+no-cache,+no-storeContent-Type:+text/html%3BcharsetContent-Length: 0HTTP/1.1 200 OKServer: Apache-Coyote/1.1Date: Fri, 08 Mar 2013 13:27:35 GMTExpires: Thu, 01 Jan 1970 00:00:00 GMTPragma: no-cacheCache-Control: no-cache, no-storeContent-Type: text/html;charset=UTF-8Transfer-Encoding: chunked-1.IBehaviorListener.0-tabbedPanel-content-panels-0-panel-tableBody-kontrollpunkter-0-kontrollpunkt-beslutningForm-valgtBeslutning" (redirection depth is 0) [MsgId: MMSG-26694]
我的服务器响应中没有正确的边界是造成这种情况的原因。
有没有办法说,即“将右边界设置为换行符 (\n)”或类似于在我的 web_reg_save_param() 中截断这个长而无用的信息的东西?在我的服务器响应中的数字 24 之后?