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 #2 (the patch)
Date Tue, 28 May 1996 22:34:38 GMT

*** mod_imap.c.orig	Tue May 28 14:07:54 1996
--- mod_imap.c	Tue May 28 15:13: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;  
    }
***************
*** 673,679 ****
      string_pos += chars_read;      /* read the quoted href text if present */
  
      if ( ! strcasecmp(directive, "default" ) ) {        /* default */
!       imap_url(r, NULL, value, mapdflt);
        if (showmenu) {              /* print the default if there's a menu */
  	if (! *href_text) {           /* if we didn't find a "href text" */
  	  strcpy(href_text, mapdflt); /* use the href itself as text */
--- 678,684 ----
      string_pos += chars_read;      /* read the quoted href text if present */
  
      if ( ! strcasecmp(directive, "default" ) ) {        /* default */
!       imap_url(r, base, value, mapdflt);
        if (showmenu) {              /* print the default if there's a menu */
  	if (! *href_text) {           /* if we didn't find a "href text" */
  	  strcpy(href_text, mapdflt); /* use the href itself as text */


Mime
View raw message