mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-28 06:11:32 +01:00
CLEANUP: http: rename http_process_request_body()
This function does not process anything, it just waits for the beginning of the request body. Let's rename it http_wait_for_request_body().
This commit is contained in:
parent
226071e0a7
commit
5a8f947f4f
@ -70,7 +70,7 @@ int http_wait_for_request(struct session *s, struct channel *req, int an_bit);
|
||||
int http_process_req_common(struct session *s, struct channel *req, int an_bit, struct proxy *px);
|
||||
int http_process_request(struct session *t, struct channel *req, int an_bit);
|
||||
int http_process_tarpit(struct session *s, struct channel *req, int an_bit);
|
||||
int http_process_request_body(struct session *s, struct channel *req, int an_bit);
|
||||
int http_wait_for_request_body(struct session *s, struct channel *req, int an_bit);
|
||||
int http_send_name_header(struct http_txn *txn, struct proxy* be, const char* svr_name);
|
||||
int http_wait_for_response(struct session *s, struct channel *rep, int an_bit);
|
||||
int http_process_res_common(struct session *t, struct channel *rep, int an_bit, struct proxy *px);
|
||||
|
||||
@ -4278,13 +4278,16 @@ int http_process_tarpit(struct session *s, struct channel *req, int an_bit)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This function is an analyser which processes the HTTP request body. It looks
|
||||
* for parameters to be used for the load balancing algorithm (url_param). It
|
||||
* must only be called after the standard HTTP request processing has occurred,
|
||||
* because it expects the request to be parsed. It returns zero if it needs to
|
||||
* read more data, or 1 once it has completed its analysis.
|
||||
/* This function is an analyser which waits for the HTTP request body. It waits
|
||||
* for either the buffer to be full, or the full advertised contents to have
|
||||
* reached the buffer. It must only be called after the standard HTTP request
|
||||
* processing has occurred, because it expects the request to be parsed and will
|
||||
* look for the Expect header. It may send a 100-Continue interim response. It
|
||||
* takes in input any state starting from HTTP_MSG_BODY and leaves with one of
|
||||
* HTTP_MSG_CHK_SIZE, HTTP_MSG_DATA or HTTP_MSG_TRAILERS. It returns zero if it
|
||||
* needs to read more data, or 1 once it has completed its analysis.
|
||||
*/
|
||||
int http_process_request_body(struct session *s, struct channel *req, int an_bit)
|
||||
int http_wait_for_request_body(struct session *s, struct channel *req, int an_bit)
|
||||
{
|
||||
struct http_txn *txn = &s->txn;
|
||||
struct http_msg *msg = &s->txn.req;
|
||||
|
||||
@ -1897,7 +1897,7 @@ struct task *process_session(struct task *t)
|
||||
}
|
||||
|
||||
if (ana_list & AN_REQ_HTTP_BODY) {
|
||||
if (!http_process_request_body(s, s->req, AN_REQ_HTTP_BODY))
|
||||
if (!http_wait_for_request_body(s, s->req, AN_REQ_HTTP_BODY))
|
||||
break;
|
||||
UPDATE_ANALYSERS(s->req->analysers, ana_list, ana_back, AN_REQ_HTTP_BODY);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user