summaryrefslogtreecommitdiff
path: root/server/vhost.c
diff options
context:
space:
mode:
authorEric Covener <covener@apache.org>2016-12-20 03:38:59 +0000
committerEric Covener <covener@apache.org>2016-12-20 03:38:59 +0000
commit1db2f476c567aa7fb19abed86cb80f5ec9d5f1ed (patch)
tree43ec3458b952dfde4087ce51b3c4ed91cf48faf8 /server/vhost.c
parent14ade933dd5c3acef2372adc8fb3ac96ed993f51 (diff)
downloadhttpd-1db2f476c567aa7fb19abed86cb80f5ec9d5f1ed.tar.gz
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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1775199 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/vhost.c')
-rw-r--r--server/vhost.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/vhost.c b/server/vhost.c
index 1896595653..e0aaedc656 100644
--- a/server/vhost.c
+++ b/server/vhost.c
@@ -757,10 +757,13 @@ static apr_status_t strict_hostname_check(request_rec *r, char *host)
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] == '.') {