Received: by taz.hyperreal.com (8.6.12/8.6.5) id BAA26857; Thu, 2 Nov 1995 01:05:07 -0800 Received: from discovery.brad.ac.uk by taz.hyperreal.com (8.6.12/8.6.5) with SMTP id BAA26828; Thu, 2 Nov 1995 01:04:39 -0800 Received: from localhost (user mjhcox) by discovery.brad.ac.uk; Thu, 2 Nov 1995 09:04:35 GMT Date: Thu, 2 Nov 1995 09:04:34 +0000 (GMT) From: Mark J Cox X-Sender: mjhcox@discovery.brad.ac.uk To: new-httpd@hyperreal.com Subject: 0.8.15 mod_imap problem Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@apache.org 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 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;