Skip to content

Commit f99c8db

Browse files
authored
Merge pull request #520 from iweiss/UNDERTOW-1091
[UNDERTOW-1091] Invalid response code for empty host value in request
2 parents efa90a2 + bb8cd96 commit f99c8db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/io/undertow/server/HttpServerExchange.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ private String extractCharset(HeaderMap headers) {
622622
*/
623623
public String getHostName() {
624624
String host = requestHeaders.getFirst(Headers.HOST);
625-
if (host == null) {
625+
if (host == null || "".equals(host.trim())) {
626626
host = getDestinationAddress().getHostString();
627627
} else {
628628
if (host.startsWith("[")) {

0 commit comments

Comments
 (0)