How do I get all cookies from GAE urlfetch service

107 views
Skip to first unread message

pman

unread,
Apr 28, 2012, 9:31:17 AM4/28/12
to Google App Engine
...
HTTPRequest httpRequest = new HTTPRequest(new URL(aRemoteServerUrl),
HTTPMethod.GET);
httpRequest.getFetchOptions().doNotFollowRedirects();

cookieManager.setCookies(httpRequest);

HTTPResponse httpResponse =
URLFetchServiceFactory.getURLFetchService().fetch(httpRequest);

cookieManager.storeCookies(httpRequest, httpResponse);
...

The above code run well in GAE sdk locally; however, when deployed in
GAE production server. It failed.

I debugged and found that the first cookie returned from
"aRemoteServerUrl" was somehow lost in GAE production server. And,
this made my code failed.

i.e. problem - incomplete cookies returned from GAE urlfetch service.

Any help?

Jeremy

unread,
Oct 27, 2012, 5:02:40 PM10/27/12
to google-a...@googlegroups.com
Hi, how did you even get to use CookieManager since its not supported in GAE. Did you create a custom one?
I'm using GAE 1.7.3
Reply all
Reply to author
Forward
0 new messages