If a HTTP request is resent (e.g. with Authentication after a 401 response), the body of the request is not sent.
This is because in req_body_handlermbuf_advance(conn->body, len) is called. Then the request is re-sent and the body size is obtained by calling mbuf_get_left(conn->body) which is now incorrect.
The fix is to reset the mbuf position of conn->body before re-sending a request.
This fixes the following bug:
If a HTTP request is resent (e.g. with Authentication after a 401 response), the body of the request is not sent.
This is because in
req_body_handler
mbuf_advance(conn->body, len)
is called. Then the request is re-sent and the body size is obtained by callingmbuf_get_left(conn->body)
which is now incorrect.The fix is to reset the
mbuf
position ofconn->body
before re-sending a request.