Hi List,
When using compression with htx, and a slightly delayed body content it
will prefix some rubbish and corrupt the gzip header..
Below output i get with attached test.. Removing http-use-htx 'fixes'
the test.
This happens with both 1.9.0 and todays commit a2dbeb2, not sure if this
ever worked before..
**** c1 0.1 len|1A\r
**** c1 0.1
chunk|\222\7\0\0\0\377\377\213\10\0\0\0\0\0\4\3JLJN\1\0\0\0\377\377
**** c1 0.1 len|0\r
**** c1 0.1 bodylen = 26
** c1 0.1 === expect resp.status == 200
**** c1 0.1 EXPECT resp.status (200) == "200" match
** c1 0.1 === expect resp.http.content-encoding == "gzip"
**** c1 0.1 EXPECT resp.http.content-encoding (gzip) == "gzip" match
** c1 0.1 === gunzip
---- c1 0.1 Gunzip error: Body lacks gzip magics
Can someone take a look? Thanks in advance.
Regards,
PiBa-NL (Pieter)
# Checks htx with compression and a short delay between headers and data send
by the server
varnishtest "Connection counters check"
feature ignore_unknown_macro
server s1 {
rxreq
txresp -nolen -hdr "Content-Length: 4"
delay 0.05
send "abcd"
} -start
haproxy h1 -conf {
global
stats socket /tmp/haproxy.socket level admin
defaults
mode http
option http-use-htx
frontend fe1
bind "fd@${fe1}"
compression algo gzip
#filter trace name BEFORE-HTTP-COMP
#filter compression
#filter trace name AFTER-HTTP-COMP
default_backend b1
backend b1
server srv1 ${s1_addr}:${s1_port}
} -start
# configure port for lua to call fe4
client c1 -connect ${h1_fe1_sock} {
txreq -url "/" -hdr "Accept-Encoding: gzip"
rxresp
expect resp.status == 200
expect resp.http.content-encoding == "gzip"
gunzip
expect resp.body == "abcd"
} -run