Received: by taz.hyperreal.com (8.6.12/8.6.5) id UAA15910; Mon, 29 Apr 1996 20:17:22 -0700 Received: by taz.hyperreal.com (8.6.12/8.6.5) id UAA15903; Mon, 29 Apr 1996 20:17:19 -0700 Date: Mon, 29 Apr 1996 20:17:19 -0700 (PDT) From: Brian Behlendorf To: new-httpd@hyperreal.com Subject: mod_imap patch - please review Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com mod_imap.c was apparently only giving relative URL's in the Location: header in 302 responses if relative links were given in the map file. I.e. a map file containing rect /foobar.html 0,0 200,200 would return a 302 Found Location: /footer.html or even worse, without the beginning slash, Location: footer.html This patch should fix this. When the "defaults" are getting set, the third call to imap_uri from imap_handler was missing the "http://servername/" stuff, and it's there now. Will people familiar with the imap module please double-check this. Thanks. Brian *** mod_imap.c.old Mon Apr 29 20:09:43 1996 --- mod_imap.c Mon Apr 29 20:12:05 1996 *************** *** 384,392 **** if ( ! base || ! *base ) { if ( value && *value ) { ! strcpy(url, value); /* no base: use what is given */ } ! else { if (r->server->port == 80 ) { sprintf(url, "http://%s/", r->server->server_hostname); } --- 384,399 ---- if ( ! base || ! *base ) { if ( value && *value ) { ! /* no base: use what is given, making sure it's relative to the request */ ! if (r->server->port == 80 ) { ! sprintf(url, "http://%s%s", r->server->server_hostname, value); ! } ! if (r->server->port != 80 ) { ! sprintf(url, "http://%s:%d%s", r->server->server_hostname, ! r->server->port, value); ! } } ! else { /* no base, no value: pick a simple default */ if (r->server->port == 80 ) { sprintf(url, "http://%s/", r->server->server_hostname); }