[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haproxy
Subject:    Re: Crash on removing response header
From:       Kevin <kevo () gatorgraphics ! com>
Date:       2013-12-31 16:17:59
Message-ID: C40AE6F8-F44D-4A31-9236-9A5F950155A6 () gatorgraphics ! com
[Download RAW message or body]

I think that is the same bug I ran into.

I was unable to get the debug tools working sufficiently to track it down myself, and \
Willy was unable to use my debug file to find it either.

He did point me toward a clever workaround of changing the header instead of deleting \
it and that seems to work. In my case changing Content-Length to Xontent-Length.

> > rsprep ^Content-Length:(.*) Xontent-Length:\1 if is_304


The other thing that worked for me was using the built in regular expressions library \
instead of PCRE.

HTH,
Kevin

On Dec 31, 2013, at 10:02 AM, William Lewis <mail@wlewis.co.uk> wrote:

> Hi,
> 
> I've just upgraded to the latest dev build 1.5-dev21-6b07bf7
> 
> Running on OSX 10.8.5, installed as follows
> make TARGET=generic  ARCH=`uname -m` USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=yes
> sudo make install
> 
> And now if a response matches a rule to delete a response header the haproxy \
> instance crashes on trying to process the response.  This is my config.
> 
> global
> daemon
> quiet
> maxconn 1024
> pidfile haproxy.pid
> log     127.0.0.1       local0
> log     127.0.0.1       local1 notice
> 
> defaults
> log global
> 
> balance roundrobin
> mode http
> http-check send-state    
> 
> retries 3
> 
> timeout connect 6000
> timeout client 1020000
> timeout server 1020000
> timeout http-request 6000
> 
> option abortonclose
> option forwardfor except 127.0.0.1    
> option http-pretend-keepalive
> option http-server-close
> option httplog
> option log-health-checks
> option log-separate-errors    
> option redispatch
> option tcpka
> 
> errorfile 200 errorfiles/200.http
> errorfile 400 errorfiles/400.http
> errorfile 403 errorfiles/403.http
> errorfile 408 errorfiles/408.http
> errorfile 500 errorfiles/500.http
> errorfile 502 errorfiles/502.http
> errorfile 503 errorfiles/503.http
> 
> 
> listen stats :7000
> mode http
> stats uri /
> 
> frontend external
> bind :80
> 
> maxconn 1024
> 
> rspidel ^X-Frame-Options:.*
> 
> default_backend migw
> 
> backend migw
> option httpchk GET /online
> server migw :8081 check port 48080
> 
> 
> Please let me know how I can further help fixing this bug.
> 
> Cheers
> 
> 
> Will Lewis
> 


[Attachment #3 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html \
charset=us-ascii"><meta http-equiv="Content-Type" content="text/html \
charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: \
space; -webkit-line-break: after-white-space;">I think that is the same bug I ran \
into.<div><br></div><div>I was unable to get the debug tools working sufficiently to \
track it down myself, and Willy was unable to use my debug file to find it \
either.</div><div><br></div><div>He did point me toward a clever workaround of \
changing the header instead of deleting it and that seems to work. In my case \
changing Content-Length to Xontent-Length.</div><div><br></div><div><blockquote \
type="cite" style="font-family: Inconsolata;"><blockquote type="cite">rsprep \
^Content-Length:(.*) Xontent-Length:\1 if \
is_304</blockquote></blockquote></div><div><br></div><div>The other thing that worked \
for me was using the built in regular expressions library instead of \
PCRE.</div><div><br></div><div>HTH,</div><div>Kevin</div><div><br><div><div>On Dec \
31, 2013, at 10:02 AM, William Lewis &lt;<a \
href="mailto:mail@wlewis.co.uk">mail@wlewis.co.uk</a>&gt; wrote:</div><br \
class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: \
break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; \
">Hi,<div><br></div><div>I've just upgraded to the latest dev \
build&nbsp;1.5-dev21-6b07bf7</div><div><br></div><div>Running on OSX 10.8.5, \
installed as follows</div><div><pre style="font-family: Consolas, 'Liberation Mono', \
Courier, monospace; font-size: 13px; margin-top: 15px; margin-bottom: 15px; \
background-color: rgb(248, 248, 248); border: 1px solid rgb(221, 221, 221); \
line-height: 19px; overflow: auto; padding: 6px 10px; border-top-left-radius: 3px; \
border-top-right-radius: 3px; border-bottom-right-radius: 3px; \
border-bottom-left-radius: 3px; color: rgb(51, 51, 51); "><code style="font-family: \
Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin: 0px; \
padding: 0px; border: none; background-color: transparent; border-top-left-radius: \
3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; \
border-bottom-left-radius: 3px; ">make TARGET=generic  ARCH=`uname -m` USE_PCRE=1 \
USE_OPENSSL=1 USE_ZLIB=yes sudo make \
install</code></pre></div><div><br></div><div>And now if a response matches a rule to \
delete a response header the haproxy instance crashes on trying to process the \
response.&nbsp;</div><div>This is my \
config.</div><div><br></div><div><div>global</div><div>&nbsp; &nbsp; \
daemon</div><div>&nbsp; &nbsp; quiet</div><div>&nbsp; &nbsp; maxconn \
1024</div><div>&nbsp; &nbsp; pidfile haproxy.pid</div><div>&nbsp; &nbsp; log &nbsp; \
&nbsp; 127.0.0.1 &nbsp; &nbsp; &nbsp; local0</div><div>&nbsp; &nbsp; log &nbsp; \
&nbsp; 127.0.0.1 &nbsp; &nbsp; &nbsp; local1 \
notice</div><div><br></div><div>defaults</div><div>&nbsp; &nbsp; log \
global</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; balance \
roundrobin</div><div>&nbsp; &nbsp; mode http</div><div>&nbsp; &nbsp; http-check \
send-state &nbsp; &nbsp;</div><div><br></div><div>&nbsp; &nbsp; retries \
3</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; timeout connect \
6000</div><div>&nbsp; &nbsp; timeout client 1020000</div><div>&nbsp; &nbsp; timeout \
server 1020000</div><div>&nbsp; &nbsp; timeout http-request \
6000</div><div><br></div><div>&nbsp; &nbsp; option abortonclose</div><div>&nbsp; \
&nbsp; option forwardfor except 127.0.0.1 &nbsp; &nbsp;</div><div>&nbsp; &nbsp; \
option http-pretend-keepalive</div><div>&nbsp; &nbsp; option \
http-server-close</div><div>&nbsp; &nbsp; option httplog</div><div>&nbsp; &nbsp; \
option log-health-checks</div><div>&nbsp; &nbsp; option log-separate-errors &nbsp; \
&nbsp;</div><div>&nbsp; &nbsp; option redispatch</div><div>&nbsp; &nbsp; option \
tcpka</div><div><br></div><div>&nbsp; &nbsp; errorfile 200 \
errorfiles/200.http</div><div>&nbsp; &nbsp; errorfile 400 \
errorfiles/400.http</div><div>&nbsp; &nbsp; errorfile 403 \
errorfiles/403.http</div><div>&nbsp; &nbsp; errorfile 408 \
errorfiles/408.http</div><div>&nbsp; &nbsp; errorfile 500 \
errorfiles/500.http</div><div>&nbsp; &nbsp; errorfile 502 \
errorfiles/502.http</div><div>&nbsp; &nbsp; errorfile 503 \
errorfiles/503.http</div><div><br></div><div><br></div><div>listen stats \
:7000</div><div>&nbsp; mode http</div><div>&nbsp; stats uri \
/</div><div><br></div><div>frontend external</div><div>&nbsp; &nbsp; bind \
:80</div><div><br></div><div>&nbsp; &nbsp; maxconn \
1024</div><div><br></div><div>&nbsp; &nbsp; rspidel \
^X-Frame-Options:.*</div><div><br></div><div>&nbsp; &nbsp; default_backend \
migw</div><div><br></div><div>backend migw</div><div>&nbsp; &nbsp; option httpchk GET \
/online</div><div>&nbsp; &nbsp; server migw :8081 check port \
48080</div><div><br></div><div><br></div><div>Please let me know how I can further \
help fixing this bug.</div><div><br></div><div>Cheers</div><div><br></div><div><br></div><div>Will \
Lewis</div><div><br></div></div></div></blockquote></div><br></div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic