aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/http.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/http.c b/lib/http.c
index ac2a9cf3d..3c0f1fb6d 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -1128,17 +1128,15 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
if(CURLE_OK == result) {
char *host=(char *)"";
const char *proxyconn="";
- char *ptr;
- ptr = checkheaders(data, "Host:");
- if(!ptr) {
+ if(!checkheaders(data, "Host:")) {
host = aprintf("Host: %s\r\n", host_port);
if(!host)
result = CURLE_OUT_OF_MEMORY;
}
- ptr = checkheaders(data, "Proxy-Connection:");
- if(!ptr)
+ if(!checkheaders(data, "Proxy-Connection:")) {
proxyconn = "Proxy-Connection: Keep-Alive\r\n";
+ }
if(CURLE_OK == result) {
/* Send the connect request to the proxy */