Hi List,

Using both 1.9.0 and 2.0-dev0-909b9d8 compression happens twice when configured in defaults.
This was noticed by user walle303 on IRC.

Seems like a bug to me as 1.8.14 does not show this behavior. Attached a little regtest that reproduces the issue.

Can someone take a look, thanks in advance.

Regards,

PiBa-NL (Pieter)

**** s1    0.0 txresp|!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
**** s1    0.0 txresp|"#$%&'()*+,-./0123456789:;<=>?@ABCD
***  s1    0.0 shutting fd 4
**   s1    0.0 Ending
***  h1    0.0 debug|00000000:b1.srvrep[000a:adfd]: HTTP/1.1 200 OK
***  h1    0.0 debug|00000000:b1.srvhdr[000a:adfd]: Content-Length: 100
***  h1    0.0 debug|00000000:b1.srvcls[000a:adfd]
**** c1    0.0 rxhdr|HTTP/1.1 200 OK\r
**** c1    0.0 rxhdr|Content-Encoding: gzip\r
**** c1    0.0 rxhdr|Transfer-Encoding: chunked\r
**** c1    0.0 rxhdr|Co57\r
**** c1    0.0 rxhdr|\037\213\010
**** c1    0.0 rxhdrlen = 78
**** c1    0.0 http[ 0] |HTTP/1.1
**** c1    0.0 http[ 1] |200
**** c1    0.0 http[ 2] |OK
**** c1    0.0 http[ 3] |Content-Encoding: gzip
**** c1    0.0 http[ 4] |Transfer-Encoding: chunked
**** c1    0.0 http[ 5] |Co57
**** c1    0.0 http[ 6] |\037\213\010
---- c1   10.2 HTTP rx timeout (fd:7 10000 ms)


# Checks compression defined in defaults doesnt happen twice

varnishtest "Compression in defaults"
feature ignore_unknown_macro

server s1 {
    rxreq
    txresp -bodylen 100
} -start

haproxy h1 -conf {
  defaults
    mode http
    compression algo gzip

  frontend fe1
    bind "fd@${fe_1}"
    default_backend b1

  backend b1
    server srv1 ${s1_addr}:${s1_port} 

} -start

client c1 -connect ${h1_fe_1_sock} {
        txreq -url "/" -hdr "Accept-Encoding: gzip"
        rxresp
        expect resp.status == 200
        expect resp.http.content-encoding == "gzip"
        expect resp.http.transfer-encoding == "chunked"
        gunzip
        expect resp.bodylen == 100

} -run
server s1 -wait

Reply via email to