You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by we...@apache.org on 2012/08/24 04:34:40 UTC
git commit: TS-1415 return 400 response if the length of request
hostname is 0
Updated Branches:
refs/heads/master 7b60a4ad1 -> 6c6f876fc
TS-1415 return 400 response if the length of request hostname is 0
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6c6f876f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6c6f876f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6c6f876f
Branch: refs/heads/master
Commit: 6c6f876fc1e63bb73f61fd75e91c99ba9a623148
Parents: 7b60a4a
Author: weijin <we...@apache.org>
Authored: Fri Aug 24 10:31:08 2012 +0800
Committer: weijin <we...@apache.org>
Committed: Fri Aug 24 10:33:57 2012 +0800
----------------------------------------------------------------------
CHANGES | 2 ++
proxy/http/HttpTransact.cc | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6c6f876f/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 9e6cf41..9ee140e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 3.3.0
+ *) [TS-1415] return 400 if the length of request hostname is zero.
+
*) [TS-1379] Better error message when mgmt socket is not available.
*) [TS-1389] Replace TSHttpTxnServerRespNoStore() with
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6c6f876f/proxy/http/HttpTransact.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 19d405d..c4c943a 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -5240,7 +5240,7 @@ HttpTransact::RequestError_t HttpTransact::check_request_validity(State* s, HTTP
return MISSING_HOST_FIELD;
}
- if (hostname_len >= MAXDNAME) {
+ if (hostname_len >= MAXDNAME || hostname_len <= 0) {
return BAD_HTTP_HEADER_SYNTAX;
}