httpclient报错

新IT民工 2011-06-09 02:22:57
- Redirect requested but followRedirects is disabled
...全文
80 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
新IT民工 2011-06-09
  • 打赏
  • 举报
回复
好的,我看看,先谢谢了。
healer_kx 2011-06-09
  • 打赏
  • 举报
回复
http://hejianghua16.blog.163.com/blog/static/31071553200782532452375/

你看看这篇帖子,有处理跳转的。

你在文章中搜“自动转向”
新IT民工 2011-06-09
  • 打赏
  • 举报
回复
HttpMethod method = new GetMethod(affixurl);//附件url
status = client.executeMethod(method);
InputStream in = method.getResponseBodyAsStream();//用Httpclient方式获取到附件io
byte[] testBytes = new byte[in.available()];
while (in.read(testBytes) != -1) {
filesize += testBytes.length;
testBytes = new byte[in.available()];
}
in.close();
运行到while的时候就报这个错误了,请各位大侠帮忙
新IT民工 2011-06-09
  • 打赏
  • 举报
回复
就是悲剧了么,前段时间还用的好好的,今天打开运行了一下就成这样了。直接报这个错误了。
healer_kx 2011-06-09
  • 打赏
  • 举报
回复
Redirect requested but followRedirects is disabled
连句代码都没有?

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧