mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:33:44 +03:00
http: improve response header handling, save cpu cycles
Saving some cpu cycles in http response header processing: - pass the length of the header line along - use string constant sizeof() instead of strlen() - check line length if prefix is possible - switch on first header char to limit checks Closes #13143
This commit is contained in:
parent
6bd4ca0ef6
commit
522ea5420f
5 changed files with 394 additions and 334 deletions
|
|
@ -103,7 +103,7 @@ CURLcode Curl_http_target(struct Curl_easy *data, struct connectdata *conn,
|
|||
CURLcode Curl_http_statusline(struct Curl_easy *data,
|
||||
struct connectdata *conn);
|
||||
CURLcode Curl_http_header(struct Curl_easy *data, struct connectdata *conn,
|
||||
char *headp);
|
||||
char *headp, size_t hdlen);
|
||||
CURLcode Curl_transferencode(struct Curl_easy *data);
|
||||
CURLcode Curl_http_req_set_reader(struct Curl_easy *data,
|
||||
Curl_HttpReq httpreq,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue