harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r912259 - in /harmony/enhanced/classlib/trunk/modules/luni/src: main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java test/api/common/org/apache/harmony/luni/tests/java/net/HttpURLConnectionTest.java
Date Sat, 20 Feb 2010 23:58:15 GMT
Author: hindessm
Date: Sat Feb 20 23:58:14 2010
New Revision: 912259

URL: http://svn.apache.org/viewvc?rev=912259&view=rev
Log:
Fix for item 1 from descriptions.txt of "[#HARMONY-6452] HttpUrlConnection
converts request headers to lowercase ...".  The props list corruption.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/HttpURLConnectionTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java?rev=912259&r1=912258&r2=912259&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java
Sat Feb 20 23:58:14 2010
@@ -62,11 +62,11 @@
         this(); // initialize fields
         for (Entry<String, List<String>> next : map.entrySet()) {
             String key = next.getKey();
-            props.add(key);
             List<String> value = next.getValue();
             LinkedList<String> linkedList = new LinkedList<String>();
             for (String element : value) {
                 linkedList.add(element);
+                props.add(key);
                 props.add(element);
             }
             keyTable.put(key, linkedList);

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/HttpURLConnectionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/HttpURLConnectionTest.java?rev=912259&r1=912258&r2=912259&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/HttpURLConnectionTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/HttpURLConnectionTest.java
Sat Feb 20 23:58:14 2010
@@ -551,6 +551,14 @@
         assertFalse(isPutCalled);
         assertEquals(mockHeaderMap, headerMap);
         assertEquals(uc.getInputStream(), mockIs);
+
+        // REGRESSION for HARMONY-6542 item 1 in descriptions.txt attachement
+        assertEquals("value1", uc.getHeaderField(0));
+        assertEquals("value2", uc.getHeaderField(1));
+        assertEquals("value1", uc.getHeaderField(2));
+        assertEquals("value2", uc.getHeaderField(3));
+        assertNull(uc.getHeaderField(4));
+
         uc.disconnect();
     }
 
@@ -789,6 +797,7 @@
         mockHeaderMap = new Hashtable<String, List<String>>();
         List<String> valueList = new ArrayList<String>();
         valueList.add("value1");
+        valueList.add("value2");
         mockHeaderMap.put("field1", valueList);
         mockHeaderMap.put("field2", valueList);
         isGetCalled = false;



Mime
View raw message