You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2016/12/20 03:38:59 UTC

svn commit: r1775199 - /httpd/httpd/trunk/server/vhost.c

Author: covener
Date: Tue Dec 20 03:38:59 2016
New Revision: 1775199

URL: http://svn.apache.org/viewvc?rev=1775199&view=rev
Log:
Fix strict Host: header checking on EBCDIC

on zOS, isascii() really means 7 bit ascii, but our strings
are in ebcdic for 99.95% of the lifetime of the server.


Modified:
    httpd/httpd/trunk/server/vhost.c

Modified: httpd/httpd/trunk/server/vhost.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/vhost.c?rev=1775199&r1=1775198&r2=1775199&view=diff
==============================================================================
--- httpd/httpd/trunk/server/vhost.c (original)
+++ httpd/httpd/trunk/server/vhost.c Tue Dec 20 03:38:59 2016
@@ -757,10 +757,13 @@ static apr_status_t strict_hostname_chec
     int is_dotted_decimal = 1, leading_zeroes = 0, dots = 0;
 
     for (ch = host; *ch; ch++) {
+#if ! APR_CHARSET_EBCDIC
         if (!apr_isascii(*ch)) {
             goto bad;
         }
-        else if (apr_isalpha(*ch) || *ch == '-') {
+        else 
+#endif
+        if (apr_isalpha(*ch) || *ch == '-') {
             is_dotted_decimal = 0;
         }
         else if (ch[0] == '.') {