httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@zyzzyva.com>
Subject Re: mod_imap fix
Date Wed, 29 May 1996 03:16:10 GMT

This breaks 'base referer' maps for me when using '..' as the URL.
I'll look into it.


> 
> 
> 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;  
>     }
> 




Mime
View raw message