Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[WEEX-482][Android] Added support for multi-value headers(WXStreamMod…
Browse files Browse the repository at this point in the history
…ule) (#1300)

* added handling for multi value headers
  • Loading branch information
kuldeepkeshwar authored and YorkShen committed Jan 7, 2019
1 parent 871401a commit c7dd6c7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,12 @@ public void onHeadersReceived(int statusCode,Map<String,List<String>> headers) {
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) {
if (entry.getValue().size() == 0) {
continue;
} else if (entry.getValue().size() == 1)
simpleHeaders.put(entry.getKey() == null ? "_" : entry.getKey(), entry.getValue().get(0));
else {
simpleHeaders.put(entry.getKey() == null ? "_" : entry.getKey(), entry.getValue().toString());
}
}
}
Expand Down

0 comments on commit c7dd6c7

Please sign in to comment.