From: Randy Terbush Date: Sun, 12 Jan 1997 02:05:42 +0000 (+0000) Subject: Make http_request.c changes a bit more portable. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1944a83cbcbb32a8baf40b19a7a326f9806a76fa;p=thirdparty%2Fapache%2Fhttpd.git Make http_request.c changes a bit more portable. Change Copyright dates for both files. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3@77422 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/RELEASE_1_1_X/src/main/http_request.c b/RELEASE_1_1_X/src/main/http_request.c index a66eb2b506f..a5426de71bb 100644 --- a/RELEASE_1_1_X/src/main/http_request.c +++ b/RELEASE_1_1_X/src/main/http_request.c @@ -1,6 +1,6 @@ /* ==================================================================== - * Copyright (c) 1995 The Apache Group. All rights reserved. + * Copyright (c) 1995-1997 The Apache Group. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -179,7 +179,14 @@ int get_path_info(request_rec *r) *cp = '\0'; return OK; } +#if defined(ENOENT) else if (errno == ENOENT) { +#else + #error Your system apparently does not define ENOENT. + #error Removal of these lines opens a security hole if protecting + #error from directory indexes with DirectoryIndex. + else { +#endif last_cp = cp; while (--cp > path && *cp != '/') @@ -188,10 +195,12 @@ int get_path_info(request_rec *r) while (cp > path && cp[-1] == '/') --cp; } +#if defined(ENOENT) else { log_reason("unable to determine if index file exists (stat() returned unexpected error)", r->filename, r); - return HTTP_FORBIDDEN; + return FORBIDDEN; } +#endif } return OK; diff --git a/RELEASE_1_1_X/src/mod_cookies.c b/RELEASE_1_1_X/src/mod_cookies.c index b94a172d6c4..83612059908 100644 --- a/RELEASE_1_1_X/src/mod_cookies.c +++ b/RELEASE_1_1_X/src/mod_cookies.c @@ -1,6 +1,6 @@ /* ==================================================================== - * Copyright (c) 1995, 1996 The Apache Group. All rights reserved. + * Copyright (c) 1995-1997 The Apache Group. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions