BUG/MEDIUM: http: cook_cnt() forgets to set its output type
authorWilly Tarreau <w@1wt.eu>
Mon, 16 Dec 2013 14:14:43 +0000 (15:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 16 Dec 2013 14:21:29 +0000 (15:21 +0100)
commitb169eba58dea10b6e25f4ab2c5418c7fa47ca213
tree1e42687add544a6603483d5af39684194b8edf04
parente8df1e128dac0b76a7d2481e242d3388bd5fcd01
BUG/MEDIUM: http: cook_cnt() forgets to set its output type

Since comit b805f71 (MEDIUM: sample: let the cast functions set their
output type), the output type of a fetch function is automatically
considered and passed to the next converter. A bug introduced in
1.5-dev9 with commit f853c46 (MEDIUM: pattern/acl: get rid of
temp_pattern in ACLs) was revealed by this last one : the output type
remained string instead of UINT, causing the cast function to try to
cast the contents and to crash on a NULL deref.

Note: this fix was made after a careful review of all fetch functions.
A few non-trivial ones had their comments amended to clearly indicate
the output type.
src/payload.c
src/proto_http.c