httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@hyperreal.com>
Subject mod_imap fix
Date Tue, 28 May 1996 03:04:24 GMT


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