Skip to content

Commit

Permalink
fix(android): set cookie on proxied request only if exists (#3077)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Jun 9, 2020
1 parent 9b96edc commit 766a61d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,10 @@ private WebResourceResponse handleProxyRequest(WebResourceRequest request, PathH
for (Map.Entry<String, String> header : headers.entrySet()) {
conn.setRequestProperty(header.getKey(), header.getValue());
}
conn.setRequestProperty("Cookie", CookieManager.getInstance().getCookie(url));
String getCookie = CookieManager.getInstance().getCookie(url);
if (getCookie != null) {
conn.setRequestProperty("Cookie", getCookie);
}
conn.setRequestMethod(method);
conn.setReadTimeout(30 * 1000);
conn.setConnectTimeout(30 * 1000);
Expand Down

0 comments on commit 766a61d

Please sign in to comment.