]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: don't trim last spaces from headers consisting only of spaces
authorWilly Tarreau <w@1wt.eu>
Fri, 16 Sep 2011 06:11:26 +0000 (08:11 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 16 Sep 2011 06:11:26 +0000 (08:11 +0200)
commit275600b6c7d5308d6c43caa8f9451bf944204437
tree1bbe6905a8f72caaac47e9520c9172a6604d5c56
parent85c27da67ee8559a948168e0b29e31ef7411c94e
BUG/MEDIUM: don't trim last spaces from headers consisting only of spaces

Commit 588bd4 fixed header parsing so that trailing spaces were not part
of the returned string. Unfortunately, if a header only had spaces, the
last spaces were trimmed past the beginning of the value, causing a negative
length to be returned.

A quick code review shows that there should be no impact since the only
places where the vlen is used are either compared to a specific value or
with explicit contents (eg: digits).

This must be backported to 1.4.
src/proto_http.c