|
|
@@ -990,16 +990,17 @@ check_http (void)
|
|
|
asprintf (&buf, "%s %s:%d HTTP/1.1\r\n%s\r\n", http_method, host_name, HTTPS_PORT, user_agent);
|
|
|
asprintf (&buf, "%sProxy-Connection: keep-alive\r\n", buf);
|
|
|
asprintf (&buf, "%sHost: %s\r\n", buf, host_name);
|
|
|
- if (strlen(proxy_auth)) { // added so this first header has the proxy info
|
|
|
+ /* added so this first header has the proxy info */
|
|
|
+ if (strlen(proxy_auth)) {
|
|
|
base64_encode_alloc (proxy_auth, strlen (proxy_auth), &auth);
|
|
|
xasprintf (&buf, "%sProxy-Authorization: Basic %s\r\n", buf, auth);
|
|
|
}
|
|
|
|
|
|
|
|
|
/* we finished our request, send empty line with CRLF */
|
|
|
- //asprintf (&buf, "%s%s", buf, CRLF); // grg-- supress extra CRLF for HTTP 1.1 standard compliance bug #266
|
|
|
- if (verbose) printf ("%s\n", buf); // we will continue to echo the buffer and a CRLF so the screen isn't goofy-looking
|
|
|
- send(sd, buf, strlen (buf), 0); // NOTE: TODO: we should not be using zero-terminated strings at all!! Fix soon..
|
|
|
+ /* we will continue to echo the buffer and a CRLF so the screen isn't goofy-looking */
|
|
|
+ if (verbose) printf ("%s\n", buf);
|
|
|
+ send(sd, buf, strlen (buf), 0);
|
|
|
buf[0]='\0';
|
|
|
|
|
|
if (verbose) printf ("Receive response from proxy\n");
|