I changed over to using the imap module for all our imagemaps yesterday.
This morning I was greeted by over 1,000 email messages from my server
each with a "500" error. It turns out that a request for
something.imap?somearg,somearg works fine; but a request for
something.imap with no arguments gives a server error. Unfortunately
a lot of clients that cannot support imagemaps don't send arguments.
Even though mod_imap is not a default module, I think it needs fixing
before 1.0. Heres a patch
Mark J Cox, mark@telescope.org -- URL:http://www.telescope.org/mark.html
University of Bradford, England ---------- tel +44.1274.384070/fax 391333
From: Mark Cox <mark@awe.com>
Subject: Mod_Imap causes server error if no arguments
Requires:
Affects: mod_imap.c
Changelog:
Internal imagemap module no longer fails when called by clients that don't
support image maps. It uses the "default" URL for these clients.
*** mod_imap.c.orig Wed Oct 11 23:17:49 1995
--- mod_imap.c Thu Nov 2 08:52:01 1995
***************
*** 272,287 ****
double dist, mindist;
int sawpoint = 0;
!
! if (r->args == NULL)
! return SERVER_ERROR;
!
! if (!(ycoord = strchr (r->args, ',')))
! return BAD_REQUEST;
!
! *ycoord++ = '\0';
! testpoint[X] = (double) atoi (r->args);
! testpoint[Y] = (double) atoi (ycoord);
if (!(imap = fopen (r->filename,"r")))
return SERVER_ERROR;
--- 272,287 ----
double dist, mindist;
int sawpoint = 0;
! if (r->args == NULL) { /* Client doesn't support Imagemaps, */
! testpoint[X] = -1; /* so fake some co-ordinates so that */
! testpoint[Y] = -1; /* the default is picked. MJC 02Nov95 */
! } else {
! if (!(ycoord = strchr (r->args, ',')))
! return BAD_REQUEST;
! *ycoord++ = '\0';
! testpoint[X] = (double) atoi (r->args);
! testpoint[Y] = (double) atoi (ycoord);
! }
if (!(imap = fopen (r->filename,"r")))
return SERVER_ERROR;
This morning I was greeted by over 1,000 email messages from my server
each with a "500" error. It turns out that a request for
something.imap?somearg,somearg works fine; but a request for
something.imap with no arguments gives a server error. Unfortunately
a lot of clients that cannot support imagemaps don't send arguments.
Even though mod_imap is not a default module, I think it needs fixing
before 1.0. Heres a patch
Mark J Cox, mark@telescope.org -- URL:http://www.telescope.org/mark.html
University of Bradford, England ---------- tel +44.1274.384070/fax 391333
From: Mark Cox <mark@awe.com>
Subject: Mod_Imap causes server error if no arguments
Requires:
Affects: mod_imap.c
Changelog:
Internal imagemap module no longer fails when called by clients that don't
support image maps. It uses the "default" URL for these clients.
*** mod_imap.c.orig Wed Oct 11 23:17:49 1995
--- mod_imap.c Thu Nov 2 08:52:01 1995
***************
*** 272,287 ****
double dist, mindist;
int sawpoint = 0;
!
! if (r->args == NULL)
! return SERVER_ERROR;
!
! if (!(ycoord = strchr (r->args, ',')))
! return BAD_REQUEST;
!
! *ycoord++ = '\0';
! testpoint[X] = (double) atoi (r->args);
! testpoint[Y] = (double) atoi (ycoord);
if (!(imap = fopen (r->filename,"r")))
return SERVER_ERROR;
--- 272,287 ----
double dist, mindist;
int sawpoint = 0;
! if (r->args == NULL) { /* Client doesn't support Imagemaps, */
! testpoint[X] = -1; /* so fake some co-ordinates so that */
! testpoint[Y] = -1; /* the default is picked. MJC 02Nov95 */
! } else {
! if (!(ycoord = strchr (r->args, ',')))
! return BAD_REQUEST;
! *ycoord++ = '\0';
! testpoint[X] = (double) atoi (r->args);
! testpoint[Y] = (double) atoi (ycoord);
! }
if (!(imap = fopen (r->filename,"r")))
return SERVER_ERROR;