diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2003-03-26 16:47:30 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2003-03-26 16:47:30 +0000 |
commit | 7cd19206cc565225d6c68ad52693cc60e7344c9c (patch) | |
tree | d44fa9d21661919a95a101142cde5716b98106ce | |
parent | 63a79148303aacba6de3d703771fca40413bb4d2 (diff) | |
download | tinyproxy-7cd19206cc565225d6c68ad52693cc60e7344c9c.tar.gz tinyproxy-7cd19206cc565225d6c68ad52693cc60e7344c9c.zip |
(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]
-rw-r--r-- | src/reqs.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); } /* |