From 3f5e502089796b9c2e310c5cb4b790b84919b3b5 Mon Sep 17 00:00:00 2001 From: chenbo01 Date: Thu, 17 Dec 2015 10:21:31 +0800 Subject: [PATCH] see this https://github.com/mcxiaoke/android-volley/pull/127 --- src/com/android/volley/toolbox/HurlStack.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/com/android/volley/toolbox/HurlStack.java b/src/com/android/volley/toolbox/HurlStack.java index 4b0b91a..1236114 100644 --- a/src/com/android/volley/toolbox/HurlStack.java +++ b/src/com/android/volley/toolbox/HurlStack.java @@ -131,8 +131,18 @@ public HttpResponse performRequest(Request request, Map addit response.setEntity(entityFromConnection(connection)); for (Entry> header : connection.getHeaderFields().entrySet()) { if (header.getKey() != null) { - Header h = new BasicHeader(header.getKey(), header.getValue().get(0)); - response.addHeader(h); + if (header.getKey() != null) { + String value = ""; + for(String head : header.getValue()){ + value += head + ";"; + } + + if(value.length() > 0) { + value = value.substring(0,value.length() - 1); + } + Header h = new BasicHeader(header.getKey(), value); + response.addHeader(h); + } } } if (ENCODING_GZIP.equalsIgnoreCase(connection.getContentEncoding())) {