I am getting the "505 HTTP Version Not Supported" error when I am doing some operations with my REST API. I checked the code by putting few io:write but it seems to me this error is originating from the cowboy code and I am debugging the code now. If anyone has experience this before and have a fix for this please share it with me.
GET /rest/account/image/03132ffc-67de-11e4-9c63-b13d0000008c?m=asdsda HTTP/1.1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:33.0) Gecko/20100101 Firefox/33.0
Accept-Encoding: gzip, deflate
HTTP/1.1 505 HTTP Version Not Supported
date: Sat, 29 Nov 2014 18:55:31 GMT
Thanks & Best Regards,
The text was updated successfully, but these errors were encountered:
The only place Cowboy does this is at the very beginning of parsing a request. If the request is good (and it probably is if it's Firefox), then the problem most likely lies in your code.
This kind of issue could occur if for example you do not keep track of the Req object, discarding useful information for Cowboy to properly detect whether the request has been fully read or not. This usually happens if a previous request on the same connection had a body.
Thanks for the prompt response @essen. I checked the trace that I took during that time and found out that it uses the same connection for upload a file and make the problematic request. So the error should be in the previous request and not in new request according your comment. Let me have a look at the code again and get back to you.
I check the application and found out that there was a place where I have ignored the Request record and reply with the original Request. Once I change that the issue got solved. Thanks for the hint @essen
Cool, glad to know. That kind of issue should be a lot less frequent with upcoming 2.0 as you need to keep track of Req with a lot less functions. I should probably look into making an analysis tool to make sure people don't mess up...
Anyway closing this as this particular issue is solved. Enjoy!