]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: http: provide 3 fetches for the body
authorWilly Tarreau <w@1wt.eu>
Fri, 1 May 2015 22:46:08 +0000 (00:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 May 2015 22:46:08 +0000 (00:46 +0200)
commita5910cc6ef96c39310f84063766953c914a2f58f
tree93937002c2e4e767ff452ae181b2f11db92184d3
parent9fbe18e174a7cb62a3eaeb0755723342ff8d3e65
MEDIUM: http: provide 3 fetches for the body

Body processing is still fairly limited, but this is a start. It becomes
possible to apply regex to find contents in order to decide where to route
a request for example. Only the first chunk is parsed for now, and the
response is not yet available (the parsing function must be duplicated for
this).

req.body : binary
  This returns the HTTP request's available body as a block of data. It
  requires that the request body has been buffered made available using
  "option http-buffer-request". In case of chunked-encoded body, currently only
  the first chunk is analyzed.

req.body_len : integer
  This returns the length of the HTTP request's available body in bytes. It may
  be lower than the advertised length if the body is larger than the buffer. It
  requires that the request body has been buffered made available using
  "option http-buffer-request".

req.body_size : integer
  This returns the advertised length of the HTTP request's body in bytes. It
  will represent the advertised Content-Length header, or the size of the first
  chunk in case of chunked encoding. In order to parse the chunks, it requires
  that the request body has been buffered made available using
  "option http-buffer-request".
doc/configuration.txt
src/proto_http.c