-/* $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
#include "squid.h"
-#define HTTP_PORT 80
#define HTTP_DELETE_GAP (64*1024)
#define READBUFSIZ 4096
strcpy(request, "/");
}
if (sscanf(hostbuf, "%[^:]:%d", host, port) < 2)
- (*port) = HTTP_PORT;
+ (*port) = urlDefaultPort(PROTO_HTTP);
return 0;
}
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) {