刘大卫 created WEEX-431:
------------------------
Summary: android stream module lost response headers when header's
value is a list
Key: WEEX-431
URL: https://issues.apache.org/jira/browse/WEEX-431
Project: Weex
Issue Type: Bug
Components: Android
Reporter: 刘大卫
Assignee: codefurture
code file:
[https://github.com/apache/incubator-weex/blob/master/android/sdk/src/main/java/com/taobao/weex/http/WXStreamModule.java]
line: 328
{code:java}
//code from WXStreamModule.java
if (headers != null) {
Iterator<Map.Entry<String, List<String>>> it =
headers.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, List<String>> entry = it.next();
if (entry.getValue().size() > 0) {
simpleHeaders.put(entry.getKey() == null ? "_" : entry.getKey(),
entry.getValue().get(0));
}
}
}
{code}
In the codes above, simpleHeaders only save the first element from header's
value list, others will be ignored. Think about the case below:
Response headers:
{code:java}
Set-Cookie: x=1;
Set-Cookie: y=2;
......{code}
the cookie value `y=2` will be lost.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)