http-parser.c

Small C library to parse HTTP requests
Log | Files | Refs | README | LICENSE

commit 515fd9168d936d6ae630482d8ef3293be6f61728
parent 963d41130cd39e8c5a1a26277ed5d47a0f46ac0f
Author: finwo <finwo@pm.me>
Date:   Sun, 13 Aug 2023 21:17:59 +0200

Response data ingest on the correct entity in a pair

Diffstat:
Msrc/http-parser.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/http-parser.c b/src/http-parser.c @@ -514,8 +514,8 @@ void http_parser_pair_request_data(struct http_parser_pair *pair, const struct b */ void http_parser_pair_response_data(struct http_parser_pair *pair, const struct buf *data) { struct http_parser_event *ev; - http_parser_response_data(pair->request, data); - if (pair->request->ready && pair->onResponse) { + http_parser_response_data(pair->response, data); + if (pair->response->ready && pair->onResponse) { ev = calloc(1,sizeof(struct http_parser_event)); ev->request = pair->request; ev->response = pair->response;