avoid an internal server error on invalid/nonexistent urls.

This commit is contained in:
fgsch 2003-06-13 06:16:37 +00:00
parent 2a879062fa
commit 853229c2d2

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-fpstatic_c,v 1.1 2003/06/13 06:16:37 fgsch Exp $
--- fpstatic.c.orig Fri Jun 13 03:13:06 2003
+++ fpstatic.c Fri Jun 13 03:13:31 2003
@@ -441,7 +441,8 @@ int translate (const char * uri) {
*/
} else if (((pos = strstr(uri, ".htm")) != NULL)
|| ((pos = strstr(uri, ".css")) != NULL)) {
- pos = strstr(uri, _VTI_ADM);
+ if ((pos = strstr(uri, _VTI_ADM)) == NULL)
+ pos = strstr(uri, _VTI_AUT);
pos = pos + 19;
Lcid = (int)strtol(pos, &pos, 10);
snprintf((char *)fnbuf, sizeof(fnbuf), "%s%s%c%04d%s",