From 23f9b309ec1d0acce5e221c7a1ebd3dd6043ef8a Mon Sep 17 00:00:00 2001 From: michaelm Date: Thu, 9 Jul 2015 13:23:03 +0100 Subject: [PATCH] 8130193: Improve HTTP connections Reviewed-by: alanb --- .../classes/sun/net/www/protocol/http/HttpURLConnection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java b/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java index f361814cd..25949db67 100644 --- a/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java +++ b/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java @@ -484,7 +484,8 @@ public class HttpURLConnection extends java.net.HttpURLConnection { private void checkMessageHeader(String key, String value) { char LF = '\n'; int index = key.indexOf(LF); - if (index != -1) { + int index1 = key.indexOf(':'); + if (index != -1 || index1 != -1) { throw new IllegalArgumentException( "Illegal character(s) in message header field: " + key); } -- GitLab