Branch: Tag:

2007-10-30

2007-10-30 13:03:29 by Anders Johansson <anders@roxen.com>

Use the protocols default port in stead of the bound port as default when canonicalizing the host header. This fixes a problem where id->url_base() did not reflect the port the client had used.

Rev: server/protocols/http.pike:1.535

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2004, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.534 2007/10/01 12:29:00 grubba Exp $"; + constant cvs_version = "$Id: http.pike,v 1.535 2007/10/30 13:03:29 anders Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
2450:    }    if (misc->host) {    // Parse and canonicalize the host header. -  misc->port = port_obj->port; +  misc->port = port_obj->default_port;    sscanf(lower_case(misc->host), "%[^:]:%d", misc->hostname, misc->port);    misc->host = misc->hostname + ":" + misc->port;    }