Index: libadblockplus-android/src/org/adblockplus/android/AndroidWebRequest.java |
diff --git a/libadblockplus-android/src/org/adblockplus/android/AndroidWebRequest.java b/libadblockplus-android/src/org/adblockplus/android/AndroidWebRequest.java |
index 77ce37145b7a54d0649a476056fc954ecfc38158..bdf1408bd8bea5cfc45dd4510f653148435de0f5 100644 |
--- a/libadblockplus-android/src/org/adblockplus/android/AndroidWebRequest.java |
+++ b/libadblockplus-android/src/org/adblockplus/android/AndroidWebRequest.java |
@@ -129,14 +129,18 @@ public class AndroidWebRequest extends WebRequest |
response.setStatus(NsStatus.OK); |
response.setResponse(sb.toString()); |
- // headers |
- if (connection.getHeaderFields().size() > 0) { |
+ if (connection.getHeaderFields().size() > 0) |
+ { |
List<HeaderEntry> responseHeaders = new LinkedList<HeaderEntry>(); |
for (Map.Entry<String, List<String>> eachEntry : |
connection.getHeaderFields().entrySet()) |
+ { |
for (String eachValue : eachEntry.getValue()) |
+ { |
if (eachEntry.getKey() != null && eachValue != null) |
responseHeaders.add(new HeaderEntry(eachEntry.getKey(), eachValue)); |
+ } |
+ } |
response.setReponseHeaders(responseHeaders); |
} |