PAIP.http post 400错误

PAIP.http post  400错误

今天,使用JAVA HTTPCLIENT发送DATA,是百度空间,结果返回400错误。。。

调试了很多无果,,结果发现是COOKIE中存在换行引起的。。将其去掉,就可以了,在文件中查看是不断行的,变量调试看起来也好。。就是实际上存在断行,导致HTTP 传送失败...

String cookieFrmFileTxt=mole.io.filex.getText(this.cookieFrmFile"gbk");

cookieFrmFileTxt=cookieFrmFileTxt.replaceAll("\r\n""");

postMethod.setRequestHeader("Cookie",cookieFrmFileTxt); 

posted @ 2012-07-16 20:53  attilaxAti  阅读(15)  评论(0编辑  收藏  举报