MEDIUM: http: make the chunk size parser only depend on the buffer
authorWilly Tarreau <w@1wt.eu>
Thu, 21 Sep 2017 06:36:33 +0000 (08:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 22 Oct 2017 07:54:14 +0000 (09:54 +0200)
commite56cdd362983009863a417d599145593249b5acf
tree40eb9b6e351b1f2bfe836848eb1a70d55d0467ff
parent8740c8b1b2fffd33ab3b54c4b304f05d803f0063
MEDIUM: http: make the chunk size parser only depend on the buffer

The chunk parser used to depend on the channel and on the HTTP message
but it's not really needed as they're only used to retrieve the buffer
as well as to return the number of bytes parsed and the chunk size.

Here instead we pass the (few) relevant information in arguments so that
the function may be reused without a channel nor an HTTP message (ie
from the H2 to H1 gateway).

As part of this API change, it was renamed to h1_parse_chunk_size() to
mention that it doesn't depend on http_msg anymore.
include/proto/h1.h
src/proto_http.c