You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In fr.eolya.utils.http.HttpLoader.getAuthCookies method:
// A CookieStore object is createdCookieStorecookieStore = newBasicCookieStore();
HttpContextlocalContext = newBasicHttpContext();
// ... and setlocalContext.setAttribute(ClientContext.COOKIE_STORE, cookieStore);
/* ... */// ... and populatedHttpResponseresponse = httpClient.execute(httpPost, localContext);
/* ... */// However this gets a different (empty) CookieStore object, thus returning no cookies!List<Cookie> cookies = httpClient.getCookieStore().getCookies();
The text was updated successfully, but these errors were encountered:
grimsa
changed the title
HttpLoader#getAuthCookies does not return any cookies
HttpLoader does not fully support cookies
Aug 11, 2015
In fr.eolya.utils.http.HttpLoader.getHttpClient(String) method when a CookieStore is populated, the Domain for the cookies is not set, making them not be used later when making HTTP requests.
The current code should be fixed:
BasicClientCookiecookie = newBasicClientCookie(pairs.getKey(), pairs.getValue());
//cookie.setDomain("your domain"); // <-- this should be implemented properlycookie.setPath("/");
cookieStore.addCookie(cookie);
In fr.eolya.utils.http.HttpLoader.getAuthCookies method:
The text was updated successfully, but these errors were encountered: