|
我在录制HTTP/WEB脚本回放的时候,有一段脚本代码
/*这些表示提交发表的问题~*/
/*下面是发表内容为test,标题为test1的疑问,账号是:F001*/
web_custom_request("StudyPlan_Student_Tutor_Index,App_Web_tutor_index.aspx.fdeda029.ashx",
"URL=http://192.168.11.2:88/lgsoft30/ajaxpro/StudyPlan_Student_Tutor_Index,App_Web_tutor_index.aspx.fdeda029.ashx",
"Method=POST",
"TargetFrame=",
"Resource=0",
"RecContentType=text/plain",
"Referer=http://192.168.11.2:88/lgsoft30/StudyPlan/Student/Tutor_Index.aspx?Plan_ID=H0000056",
"Snapshot=t103.inf",
"Mode=HTML",
"EncType=text/plain; charset=utf-8",
"Body={\"content\":\"<DIV>TEST1</DIV>\"}",
LAST);
web_reg_find("Search=Body",
"Text=1",
"NotFound=EMPTY",
LAST);
web_custom_request("StudyPlan_Student_Tutor_Index,App_Web_tutor_index.aspx.fdeda029.ashx_2",
"URL=http://192.168.11.2:88/lgsoft30/ajaxpro/StudyPlan_Student_Tutor_Index,App_Web_tutor_index.aspx.fdeda029.ashx",
"Method=POST",
"TargetFrame=",
"Resource=0",
"RecContentType=text/plain",
"Referer=http://192.168.11.2:88/lgsoft30/StudyPlan/Student/Tutor_Index.aspx?Plan_ID=H0000056",
"Snapshot=t104.inf",
"Mode=HTML",
"EncType=text/plain; charset=utf-8",
"Body={\" Plan_ID\":\"H0000056\",\"UserID\":\"F001\",\"postTitle\":\"TEST\",\"
postContent\":\"<DIV>TEST1</DIV>\"}",
LAST);
/*发表成功~*/
录制时第一个web_custom_request函数,服务器返回的值:
Header:
------------------------------------------
HTTP/1.1 200 OK
Date: Mon, 24 May 2010 07:17:05 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
Content-Type: text/plain; charset=utf-8
Content-Length: 1519
Body:
------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type c></HEAD>
<BODY><pRE>"TEST1";/*</PRE></BODY></HTML>
录制时第二个web_custom_request函数,服务器返回的值:
Header:
------------------------------------------
HTTP/1.1 200 OK
Date: Mon, 24 May 2010 07:17:05 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
Content-Type: text/plain; charset=utf-8
Content-Length: 6
Body:
------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type c></HEAD>
<BODY><pRE>"1";/*</PRE></BODY></HTML>
我的分析是,第一个请求是验证提交的数据是否合理,然后第二个是提交数据给服务器,
成功则服务器返回1.
在执行回放的时候,日志服务器返回的日志则是
Action.c(339): 警告: 带有参数分隔符的字符串“"content":"<DIV>TEST1yguggyuygu</DIV>"”不是参数。
Action.c(339): “http://192.168.11.2:88/lgsoft30/ajaxpro/StudyPlan_Student_Tutor_Index,App_Web_tutor_index.aspx.fdeda029.ashx”(RelFrameId=1)的 t=162304ms: 178 个字节响应标头
Action.c(339): HTTP/1.1 200 OK\r\n
Action.c(339): Date: Mon, 24 May 2010 12:56:51 GMT\r\n
Action.c(339): Server: Microsoft-IIS/6.0\r\n
Action.c(339): X-Powered-By: ASP.NET\r\n
Action.c(339): X-AspNet-Version: 2.0.50727\r\n
Action.c(339): Cache-Control: private\r\n
Action.c(339): Content-Length: 0\r\n
Action.c(339): \r\n
Action.c(339): web_custom_request("StudyPlan_Student_Tutor_Index,App_Web_tutor_index.aspx.fdeda029.ashx") 已成功,0 个正文字节,178 介标头字节 [MsgId: MMSG-26386]
Action.c(358): 警告: 带有参数分隔符的字符串“"plan_ID":"H0000056","UserID":"F001","2","postTitle":"TEST","postContent":"<DIV>TEST1yguggyuygu</DIV>"”不是参数。
Action.c(358): “http://192.168.11.2:88/lgsoft30/ajaxpro/StudyPlan_Student_Tutor_Index,App_Web_tutor_index.aspx.fdeda029.ashx”(RelFrameId=1)的 t=162502ms: 178 个字节响应标头
Action.c(358): HTTP/1.1 200 OK\r\n
Action.c(358): Date: Mon, 24 May 2010 12:56:52 GMT\r\n
Action.c(358): Server: Microsoft-IIS/6.0\r\n
Action.c(358): X-Powered-By: ASP.NET\r\n
Action.c(358): X-AspNet-Version: 2.0.50727\r\n
Action.c(358): Cache-Control: private\r\n
Action.c(358): Content-Length: 0\r\n
Action.c(358): \r\n
Action.c(358): web_custom_request("StudyPlan_Student_Tutor_Index,App_Web_tutor_index.aspx.fdeda029.ashx_2") 已成功,0 个正文字节,178 介标头字节 [MsgId: MMSG-26386]
在这俩个函数里没有需要关联的地方,Plan_ID=H0000056是正确的,不需要关联,为什么俩个web_custom_request的正文里没有返回数据并且没有提交成功呢?在运行查看器里会观察到错误的页面,本人知识有限,不知道怎么解决,望高手指点一二!
[ 本帖最后由 wangchao6656 于 2010-5-24 21:22 编辑 ] |
|