Hi,

this is normal behavior of HAProxy since it validates both requests
and responses against HTTP rfc.
In order to let your request pass, you can try to use "option
accept-invalid-http-request" on the frontend to disable it.

cheers


On Mon, Dec 26, 2011 at 6:53 PM, Sreekanth V <[email protected]> wrote:
> HI,
>
> We have been facing a strange issue when we moved to HAProxy based load
> balancing system, instead of just using the nginx.
>
> Our Android app sends a request to the server that has something like this
> for the headers( It's a bug in our code)
>
> POST /android/session
>
> charset: utf-8<CRLF>
> accept-encoding: gzip, deflate <CRLF>
> cookie <CRLF>
> User-Agent: Dalvik... <CRLF>
>
> <CRLF><CRLF>
>
> Notice the Lack of colon after cookie.
>
> It used to work fine till we were posting to nginx, because i guess nginix
> was ignoring the cookie and moving on to other headers
> But we now have HAProxy fronting a set of nginx servers, and we are noticing
> HAProxy return 400 Bad Request on this. Some basic digging into the code it
> looks like it is expecting a colon and value after the cookie, if it does
> not find it it sets up a bad response. So should HAProxy not ignore the
> missing colon and continue parsing the headers till <CRLF><CRLF> is found.
>
> I am sure above header does not follow the standard spec,most other parsers
> also barf for the above headers, but would the implementation be better if
> it is forgiving of the malformed headers. Anybody has had similar issues?
>
> The reason I'd like to make a patch in HAProxy is that we have old version
> of andriod apps floating on the internet, and even if we fix the bug in the
> new app, older versions will not work.
>
> Thoughts?
>
> Cheers
> sreekanth
>
>

Reply via email to