HTTP error code 505
If you make a request to Tomcat with trailing whitespace after the HTTP version (as in your example), Tomcat will respond with 505 error. Confirmed on Tomcat 7.0.27.
RFC 2616 (HTTP 1.1) says that the HTTP-Version
is made up of "HTTP/" + digit + "." + digit
. Request-Line ends with " " + HTTP-Version + CRLF
which means no whitespace is allowed after that last digit.
References:
- HTTP-Version: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.1
- Request-Line: http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1
Clearly not the answer for the OP, but I ran into this error message tonight while trying to debug a SOLR server.
My problem wasn't an extra space after the HTTP version.
my client application was logging the bad URL, which i blithely copied & pasted into a telnet connection to the SOLR tomcat's http port. My log message showed the URL without properly %20-encoding a space in the URL. I got the bad HTTP version error, presumably because it was interpreting everything after the space in the URL as my HTTP version.
thanks to http://java.dzone.com/news/solr-tomcat-and-http11-505 for the hint.