You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Behlendorf <br...@hyperreal.com> on 1996/05/28 05:04:24 UTC
mod_imap fix
This appeared to clear up the problems I was having with imagemaps not
giving the complete URL in the Location: header. Could a couple others
please check this out and give me feedback - it's running live on apache
now so I should hear about problems if they persist.
Brian
*** mod_imap.c.orig Mon May 27 16:27:51 1996
--- mod_imap.c Mon May 27 20:01:15 1996
***************
*** 384,399 ****
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);
! }
! if (r->server->port != 80 ) {
! sprintf(url, "http://%s:%d/", r->server->server_hostname,
r->server->port);
! } /* no base, no value: pick a simple default */
}
return;
}
--- 384,404 ----
if ( ! base || ! *base ) {
if ( value && *value ) {
! /* no base: use what is given, making sure it's relative*/
! if (r->server->port == 80 ) {
! sprintf(url, "http://%s%s", r->server->server_hostname, value);
! } else {
! 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);
! } else {
! sprintf(url, "http://%s:%d", r->server->server_hostname,
r->server->port);
! } /* no base, no value: pick a simple default */
}
return;
}