mirror of
https://github.com/curl/curl.git
synced 2026-08-24 14:03:35 +03:00
misc: reduce strlen() calls with Curl_dyn_add()
Use STRCONST() to switch from Curl_dyn_add() to Curl_dyn_addn() for string literals. Closes #8398
This commit is contained in:
parent
2a1951519e
commit
b807219292
7 changed files with 37 additions and 34 deletions
|
|
@ -329,14 +329,15 @@ static CURLcode CONNECT(struct Curl_easy *data,
|
|||
data->set.str[STRING_USERAGENT]);
|
||||
|
||||
if(!result && !Curl_checkProxyheaders(data, conn, "Proxy-Connection"))
|
||||
result = Curl_dyn_add(req, "Proxy-Connection: Keep-Alive\r\n");
|
||||
result = Curl_dyn_addn(req,
|
||||
STRCONST("Proxy-Connection: Keep-Alive\r\n"));
|
||||
|
||||
if(!result)
|
||||
result = Curl_add_custom_headers(data, TRUE, req);
|
||||
|
||||
if(!result)
|
||||
/* CRLF terminate the request */
|
||||
result = Curl_dyn_add(req, "\r\n");
|
||||
result = Curl_dyn_addn(req, STRCONST("\r\n"));
|
||||
|
||||
if(!result) {
|
||||
/* Send the connect request to the proxy */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue