HTTP/1.1 505 HTTP Version Not Supported reason and solution
来源:互联网 发布:java输出两个变量 编辑:程序博客网 时间:2024/06/05 09:55
最近,需要编写一个工具模拟HTTP Client, 登录到一个Server并且要添加一些数据。出现的问题是:login可以成功,但是,添加数据时,总是报错如下:
HTTP/1.1 505 HTTP Version Not Supported
Server: Apache-Coyote/1.1
Date: Wed, 26 Aug 2009 03:20:19 GMT
Connection: close
根据错误的提示,应该是HTTP版本不一致,可是,第一次login都成功了,说明版本应该没有问题呀。
找了好多资料,都说版本有问题。
最后,终于找到最终的原因了,HTTP写的格式是非常严谨的,只要格式不匹配,就会报错误。
我在HTTP的头中添加一个空格:
HTTP/1.1[空格在此]
Accept: */*
Accept-Language: zh-cn
Host: 10.224.54.126:8080
Cookie: F5_CREDENTIAL=L7a
Connection: Keep-Alive
在提交请求,连login都不可以了,而且报的错误是:HTTP/1.1 505 HTTP Version Not Supported
从此可以推断出,我的添加数据的消息中可能某个地方多了一个空格。
经过仔细的查找,果然,找到了几个空格,用%20替代之,问题解决了。
- HTTP/1.1 505 HTTP Version Not Supported reason and solution
- HTTP request failed! HTTP/1.1 505 HTTP Version Not Supported error
- failed to open stream: HTTP request failed! HTTP/1.1 505 HTTP Version Not Supported in
- python:HTTP Error 505: HTTP Version Not Supported
- http 505 The server does not support the HTTP protocol version used in the request
- 问题_http 1.1 405 http method get is not supported by this url
- HTTP method GET is not supported by this URL
- HTTP method GET is not supported by this URL
- HTTP method POST is not supported by this URL
- 405 HTTP method GET is not supported by this URL
- HTTP method GET is not supported by this URL
- HTTP method GET is not supported by this URL 问题解决
- HTTP method GET is not supported by this URL
- HTTP method GET is not supported by this URL
- HTTP method GET is not supported by this URL
- HTTP method GET is not supported by this URL
- HTTP method POST is not supported by this URL
- HTTP method GET is not supported by this URL
- 真知灼见:.NET和J2EE的竞争与共荣
- SQL常用语句备忘
- memcache通信协议
- @media all的含义
- YC2440-F移植blueZ
- HTTP/1.1 505 HTTP Version Not Supported reason and solution
- html{overflow:scroll;}的含义
- Linux Platform Device and Driver
- 开机自动更换GRUB背景图像
- 将一个数据库中的表导入另一数据库
- 七夕随笔
- c# 调用存储过程方法
- SQL 索引的用法
- .htc文件含义