From: wessels <> Date: Fri, 12 Apr 1996 10:33:48 +0000 (+0000) Subject: add Forwarded: request header X-Git-Tag: SQUID_3_0_PRE1~6205 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=daddb1432fdd53a3bbaceaed65ab7cf489163ce6;p=thirdparty%2Fsquid.git add Forwarded: request header --- diff --git a/src/http.cc b/src/http.cc index 28cc0b1c6c..f3db3ed0b8 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,4 +1,4 @@ -/* $Id: http.cc,v 1.38 1996/04/11 22:52:28 wessels Exp $ */ +/* $Id: http.cc,v 1.39 1996/04/12 04:33:48 wessels Exp $ */ /* * DEBUG: Section 11 http: HTTP @@ -6,7 +6,6 @@ #include "squid.h" -#define HTTP_PORT 80 #define HTTP_DELETE_GAP (64*1024) #define READBUFSIZ 4096 @@ -69,7 +68,7 @@ static int http_url_parser(url, host, port, request) strcpy(request, "/"); } if (sscanf(hostbuf, "%[^:]:%d", host, port) < 2) - (*port) = HTTP_PORT; + (*port) = urlDefaultPort(PROTO_HTTP); return 0; } @@ -461,6 +460,16 @@ static void httpSendRequest(fd, data) ybuf = NULL; } } + + /* Add Forwarded: header */ + ybuf = get_free_4k_page(__FILE__,__LINE__); + sprintf(ybuf, "Forwarded: by http://%s:%d/\r\n", + getMyHostname(), getAsciiPortNum()); + strcat(buf, ybuf); + len += strlen(ybuf); + put_free_4k_page(ybuf, __FILE__, __LINE__); + ybuf = NULL; + strcat(buf, crlf); len += 2; if (post_buf) {