From fd0d3c93f2872e20d3afa6b93869482652bc9882 Mon Sep 17 00:00:00 2001 From: jwilson Date: Tue, 31 Dec 2013 10:39:52 -0500 Subject: [PATCH] Small changes to follow up on PR 384. --- .../com/squareup/okhttp/internal/http/SpdyTransport.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/okhttp/src/main/java/com/squareup/okhttp/internal/http/SpdyTransport.java b/okhttp/src/main/java/com/squareup/okhttp/internal/http/SpdyTransport.java index 5ed951090..5f35582c0 100644 --- a/okhttp/src/main/java/com/squareup/okhttp/internal/http/SpdyTransport.java +++ b/okhttp/src/main/java/com/squareup/okhttp/internal/http/SpdyTransport.java @@ -28,7 +28,7 @@ import java.net.CacheRequest; import java.net.ProtocolException; import java.net.URL; import java.util.ArrayList; -import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Locale; import java.util.Set; @@ -102,8 +102,8 @@ public final class SpdyTransport implements Transport { * values, they are concatenated using "\0" as a delimiter. */ public static List writeNameValueBlock(Headers headers) { - Set names = new HashSet(); - List result = new ArrayList(); + Set names = new LinkedHashSet(); + List result = new ArrayList(headers.length() * 2); for (int i = 0; i < headers.length(); i++) { String name = headers.getFieldName(i).toLowerCase(Locale.US); String value = headers.getValue(i);