From 7cd19206cc565225d6c68ad52693cc60e7344c9c Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Wed, 26 Mar 2003 16:47:30 +0000 Subject: (establish_http_connection): Always include the port number for the requested server. This fixes a problem when the server is not listening on the default port, 80. [Fix suggested by duncan@sapio.co.uk] --- src/reqs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/reqs.c b/src/reqs.c index 8f0b32c..9fe3404 100644 --- a/src/reqs.c +++ b/src/reqs.c @@ -1,4 +1,4 @@ -/* $Id: reqs.c,v 1.94 2003-03-14 06:13:04 rjkaes Exp $ +/* $Id: reqs.c,v 1.95 2003-03-26 16:47:30 rjkaes Exp $ * * This is where all the work in tinyproxy is actually done. Incoming * connections have a new child created for them. The child then @@ -283,9 +283,10 @@ establish_http_connection(struct conn_s *connptr, struct request_s *request) { return write_message(connptr->server_fd, "%s %s HTTP/1.0\r\n" \ - "Host: %s\r\n" \ + "Host: %s:%u\r\n" \ "Connection: close\r\n", - request->method, request->path, request->host); + request->method, request->path, + request->host, request->port); } /* -- cgit v1.2.3