Re: GenHash problems
Frank Baalbergen <[email protected]>
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Jan Hugo, If i look at your patch I see that your change won't have any affect on current master. See the following source code: https://github.com/acassen/keepalived/blob/master/genhash/http.h If you check the original commit: https://github.com/acassen/keepalived/commit/ea9a1b6d3467b0341671ae4ba03d8f2412eca66a You see that the Host header is already `Host: [%s]%s\r\n\r\n`. Regards, Frank On 04/07/2014 11:31 AM, Jan Hugo Prins wrote: > Hi, > > I have searched a little further and I have found the following. In > keepalived 1.2.7 creates a host header for the request that looks like this: > > Host: 2a02:b70:0:521:1::21:80\r\n > > In keepalived 1.2.12 the host header looks like this: > > Host: [2a02:b70:0:521:1::21]::80\r\n > > On the second host header my apache server (2.2.15) responds with a > HTTP/1.1 400 Bad Request. > > I think the problem is that we have a double colon before the port number. > > Looking in the code I found the REQUEST_TEMPLATE_IPV6 to have a colon in > the template while the port number also includes a colon if you look in > keepalived/check/check_http.c. This results in the double colon. I have > attached a patch that fixes this problem. > > I have patched the include file to make the REQUEST_TEMPLATE_IPV6 follow > the same semantics as the REQUEST_TEMPLATE_IPV4. > > Using this patch the code works fine. > > Jan Hugo Prins -- Frank Baalbergen - System / Network Engineer T +31 (0)10 2760434 | [email protected] | www.mendix.com ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees_APR