java - 当httpClient在不同环境访问同一个请求出现response不一致的解决思路
大家讲道理
大家讲道理 2017-04-18 10:51:08
0
2
560

主要是求一个解决问题的思路

情况是这样的,我这边在本地用java的http client去执行一个post请求,返回的是302,但是当我部署到服务器上时,返回变成200了。

本地环境:jdk 1.8 tomcat 8
服务器:jdk 1.7 tomcat没去确认版本

想问下出现一样的代码,httpclient会因为jdk或者tomcat版本有差异吗。或者,这种情况可以用怎么样的思路去排查问题

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
巴扎黑

Is it related to IP?

Peter_Zhu

Obviously there are two states. If you can see the server source code, trace the source code to see if the 302 jump is due to logical judgment. There may be a problem with the request body or header of the post request. Of course It is also possible that the web side on the server has forwarded requests, so we can only rule them out one by one

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!