changeset 11130:c00bcb8d4596

8130193: Improve HTTP connections Reviewed-by: alanb
author michaelm
date Thu, 09 Jul 2015 13:23:03 +0100
parents 0dc0fa38ee6a
children 075b7f37ec28 1416a541440a
files src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Mon Jul 13 13:37:22 2015 +0000
+++ b/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Thu Jul 09 13:23:03 2015 +0100
@@ -484,7 +484,8 @@
     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);
         }