httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ed Korthof ...@organic.com>
Subject mod_imap stuff
Date Thu, 22 May 1997 19:58:45 GMT
I exchanged a bit more mail with the guy who wrote to this list earlier
this week re: problems he was having with mod_imap.  It turns out that the
problem was a buggy client (WebExplorerer); but I also noticed something
which may or may not be considered a bug in mod_imap.

If you put

base referer
rect #baz 0,0 50,50

and the referer is http://virtualhost/foo/bar.html, and the client clicks
on 10,10, then rather than being sent to
http://virtualhost/foo/bar.html#baz, they're sent to
http://virtualhost/foo/#baz -- this is not what I would expect, though I
don't know if it's technically incorrect.  But basically mod_imap strips
the filename of the base whenever it's using the base; imo, if the base
looks like a named target (ie. it starts w/ '#'), then the filename
shouldn't be stripped. 

Anyway, I patched mod_imap to do this; the patch follows.  If you wish to
redirect the client to a file starting with '#', you can do so by refering
to it as './#{filename}' -- but based on what I've seen, clients may not
respect that naming convention, and may request the directory, and assume
'#{filename}' is a named target.

I think this should not go into 1.2, but would like to include is as a
contributor patch, and possibly include it in a later version.  If others
consider this a bug fix, fine, but... <shrug>

     -- Ed Korthof        |  Web Server Engineer --
     -- ed@organic.com    |  Organic Online, Inc --
     -- (415) 278-5676    |  Fax: (415) 284-6891 --

**********
*** mod_imap.c.orig	Mon May 19 12:35:08 1997
--- mod_imap.c	Tue May 20 20:06:42 1997
***************
*** 442,451 ****
  			  base URL string at the first single slash */
  	else {
  	  directory = string_pos; /* save the start of the directory portion */
! 
! 	  string_pos = strrchr(string_pos, '/');  /* now reuse string_pos */
! 	  string_pos++;  /* step over that last slash */
! 	  *string_pos = '\0';
  	}              /* but if the map url is relative, leave the
  			slash on the base (if there is one) */
  	break;
--- 442,454 ----
  			  base URL string at the first single slash */
  	else {
  	  directory = string_pos; /* save the start of the directory portion */
!           if ( value[0] != '#' ) {
! /* if value starts w/ '#', it's a named target -- use full base, including a
!    file (use './#...' for a file starting with a literal '#' */
! 	    string_pos = strrchr(string_pos, '/');  /* now reuse string_pos */
! 	    string_pos++;  /* step over that last slash */
! 	    *string_pos = '\0';
!           }
  	}              /* but if the map url is relative, leave the
  			slash on the base (if there is one) */
  	break;
*********



Mime
View raw message