精易论坛

标题: 关于POST的一个问题,需要点思路 [打印本页]

作者: 桃桃    时间: 2018-10-7 20:36
标题: 关于POST的一个问题,需要点思路
今天碰见个post,很奇怪,一直没想到办法解决,思想有点僵硬,特来求助一下.
情况如下:
一个post包,除了提交数据里面有个数值不同,其他的完全一样,就这数值不同,导致取不到数据.
S=1,S=2这2个都可以取到返回数据,但是S=3就返回为空了.
我把cookie,协yi头什么都带上了,S=3一直返回空
网页抓包看,S=3有返回内容,和S=1,S=2一样的返回内容.

求助下,请大家给点思路,为啥会出现这种情况?或者有人碰见过,怎么解决的?
cookie,协yi头,编码转换都试过了.
(因为网页在nei网,所以无法给大家网址测试)

作者: 臭咸鱼    时间: 2018-10-7 20:43
因为网页在nei网,所以我们无法测试
因为无法测试,所以我们无法回答
作者: ljaihong    时间: 2018-10-7 20:44
跟进一下  看看S这个值 是个什么值  就清楚了
作者: 桃桃    时间: 2018-10-7 20:46
ljaihong 发表于 2018-10-7 20:44
跟进一下  看看S这个值 是个什么值  就清楚了

S是个提交数据,S=1就是cha询待审核,S=2就是待签收,S=3是待反馈,一个cha询字段
作者: ljaihong    时间: 2018-10-7 20:52
桃桃 发表于 2018-10-7 20:46
S是个提交数据,S=1就是cha询待审核,S=2就是待签收,S=3是待反馈,一个cha询字段

s=3时 拦截到的包是什么内容     你现在用的哪种访问方式
作者: 桃桃    时间: 2018-10-7 20:56
ljaihong 发表于 2018-10-7 20:52
s=3时 拦截到的包是什么内容     你现在用的哪种访问方式

S=3的时候,拦截的包和S=1一模一样,包括包的大小都是一样的.
但是S=1就能返回cha询出来的数量,S=3就返回空白的.
我用的网页_访问(),把cookie,协yi头什么的都带上了,也没用.
作者: ljaihong    时间: 2018-10-7 20:58
桃桃 发表于 2018-10-7 20:56
S=3的时候,拦截的包和S=1一模一样,包括包的大小都是一样的.
但是S=1就能返回cha询出来的数量,S=3就返回 ...

换成网页_访问_对象 试试
作者: 桃桃    时间: 2018-10-7 21:03
ljaihong 发表于 2018-10-7 20:58
换成网页_访问_对象 试试

网页_访问_对象也试过了,只是用的文本提交,我明天去试试字节集提交看看.
我把我能想到的办法都试过,但是人老了,思想僵硬,唉
明天我把包复制到wai网,你再帮我看看
作者: 纯属打酱油    时间: 2018-10-7 22:30
referer这类的也要注意下
作者: 玄冰    时间: 2018-10-7 22:54
歇一天的压缩那个去掉了吗
作者: 桃桃    时间: 2018-10-9 19:07
ljaihong 发表于 2018-10-7 20:58
换成网页_访问_对象 试试

这两天天天在测试,最后发现返回的协议头带有"405",百度后说是访问格式错误,不能用post访问.还有的说是"静态页面"什么的,我把post包改成get,还是返回空白.实在是醉了.我把能取回信息的包和取不到信息的包发出来,麻烦你看看.
能正确返回的:
POST http://XX.XX.X.XXX/team/command/commandList HTTP/1.1
Host: XX.XX.X.XXX
Connection: keep-alive
Content-Length: 142
Accept: application/json, text/plain, */*
Origin: http://XX.XX.X.XXX
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://XX.XX.X.XXX/index.html
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8
Cookie: JSESSIONID=047B9A8750C8A558BBBCB41FBBA020F4

querytype=1&relatetype=1&commandtype=&citycode=5000&countycode=50000&otherinfo=&pageNumber=1&pageSize=10&datetype=nolimit&startdate=&enddate=
不能正确返回,返回为空的:
POST http://XX.XX.X.XXX/team/command/commandList HTTP/1.1
Host: XX.XX.X.XXX
Connection: keep-alive
Content-Length: 142
Accept: application/json, text/plain, */*
Origin: http://XX.XX.X.XXX
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://XX.XX.X.XXX/index.html
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8
Cookie: JSESSIONID=047B9A8750C8A558BBBCB41FBBA020F4

querytype=1&relatetype=4&commandtype=&citycode=5000&countycode=50000&otherinfo=&pageNumber=1&pageSize=10&datetype=nolimit&startdate=&enddate=


就红色的数字那里,1是搜索待签收,4是待反馈,1能正确返回,4返回就是空白.

正确的返回是:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: no-store
Content-Type: application/json;charset=UTF-8
Date: Mon, 08 Oct 2018 08:46:28 GMT
Content-Length: 195


{"countTotal":true,"pageNumber":1,"pageSize":10,"totalPage":0,"totalRow":0,"beginIndex":1,"endIndex":10,"orderField":null,"orderMode":null,"criteria":{"alias":"this"},"headerList":null,"list":[]}

错误的返回是:
HTTP/1.1 405 Method Not Allowed
Server: Apache-Coyote/1.1
Cache-Control: no-store
Allow: GET, HEAD
Transfer-Encoding: chunked
Date: Mon, 08 Oct 2018 09:07:02 GMT


作者: 桃桃    时间: 2018-10-9 19:10
915743805 发表于 2018-10-7 22:30
referer这类的也要注意下

这两天天天在测试,最后发现返回的协议头带有"405",百度后说是访问格式错误,不能用post访问.还有的说是"静态页面"什么的,我把post包改成get,还是返回空白.实在是醉了.我把能取回信息的包和取不到信息的包发出来,麻烦你看看.(XX.XXX是网址)

能正确返回的:
POST http://XX.XX.X.XXX/team/command/commandList HTTP/1.1
Host: XX.XX.X.XXX
Connection: keep-alive
Content-Length: 142
Accept: application/json, text/plain, */*
Origin: http://XX.XX.X.XXX
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://XX.XX.X.XXX/index.html
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8
Cookie: JSESSIONID=047B9A8750C8A558BBBCB41FBBA020F4

querytype=1&relatetype=1&commandtype=&citycode=5000&countycode=50000&otherinfo=&pageNumber=1&pageSize=10&datetype=nolimit&startdate=&enddate=

不能正确返回,返回为空的:
POST http://XX.XX.X.XXX/team/command/commandList HTTP/1.1
Host: XX.XX.X.XXX
Connection: keep-alive
Content-Length: 142
Accept: application/json, text/plain, */*
Origin: http://XX.XX.X.XXX
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://XX.XX.X.XXX/index.html
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8
Cookie: JSESSIONID=047B9A8750C8A558BBBCB41FBBA020F4

querytype=1&relatetype=4&commandtype=&citycode=5000&countycode=50000&otherinfo=&pageNumber=1&pageSize=10&datetype=nolimit&startdate=&enddate=


就红色的数字那里,1是搜索待签收,4是待反馈,1能正确返回,4返回就是空白.
正确的返回是:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: no-store
Content-Type: application/json;charset=UTF-8
Date: Mon, 08 Oct 2018 08:46:28 GMT
Content-Length: 195

{"countTotal":true,"pageNumber":1,"pageSize":10,"totalPage":0,"totalRow":0,"beginIndex":1,"endIndex":10,"orderField":null,"orderMode":null,"criteria":{"alias":"this"},"headerList":null,"list":[]}

错误的返回是:
HTTP/1.1 405 Method Not Allowed
Server: Apache-Coyote/1.1
Cache-Control: no-store
Allow: GET, HEAD
Transfer-Encoding: chunked
Date: Mon, 08 Oct 2018 09:07:02 GMT
作者: 桃桃    时间: 2018-10-9 19:10
玄冰 发表于 2018-10-7 22:54
歇一天的压缩那个去掉了吗

这两天天天在测试,最后发现返回的协议头带有"405",百度后说是访问格式错误,不能用post访问.还有的说是"静态页面"什么的,我把post包改成get,还是返回空白.实在是醉了.我把能取回信息的包和取不到信息的包发出来,麻烦你看看.(XX.XXX是网址)

能正确返回的:
POST http://XX.XX.X.XXX/team/command/commandList HTTP/1.1
Host: XX.XX.X.XXX
Connection: keep-alive
Content-Length: 142
Accept: application/json, text/plain, */*
Origin: http://XX.XX.X.XXX
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://XX.XX.X.XXX/index.html
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8
Cookie: JSESSIONID=047B9A8750C8A558BBBCB41FBBA020F4

querytype=1&relatetype=1&commandtype=&citycode=5000&countycode=50000&otherinfo=&pageNumber=1&pageSize=10&datetype=nolimit&startdate=&enddate=

不能正确返回,返回为空的:
POST http://XX.XX.X.XXX/team/command/commandList HTTP/1.1
Host: XX.XX.X.XXX
Connection: keep-alive
Content-Length: 142
Accept: application/json, text/plain, */*
Origin: http://XX.XX.X.XXX
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://XX.XX.X.XXX/index.html
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8
Cookie: JSESSIONID=047B9A8750C8A558BBBCB41FBBA020F4

querytype=1&relatetype=4&commandtype=&citycode=5000&countycode=50000&otherinfo=&pageNumber=1&pageSize=10&datetype=nolimit&startdate=&enddate=


就红色的数字那里,1是搜索待签收,4是待反馈,1能正确返回,4返回就是空白.
正确的返回是:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: no-store
Content-Type: application/json;charset=UTF-8
Date: Mon, 08 Oct 2018 08:46:28 GMT
Content-Length: 195

{"countTotal":true,"pageNumber":1,"pageSize":10,"totalPage":0,"totalRow":0,"beginIndex":1,"endIndex":10,"orderField":null,"orderMode":null,"criteria":{"alias":"this"},"headerList":null,"list":[]}

错误的返回是:
HTTP/1.1 405 Method Not Allowed
Server: Apache-Coyote/1.1
Cache-Control: no-store
Allow: GET, HEAD
Transfer-Encoding: chunked
Date: Mon, 08 Oct 2018 09:07:02 GMT




欢迎光临 精易论坛 (https://125.confly.eu.org/) Powered by Discuz! X3.4