On Wed, Nov 11, 2009 at 12:29 PM, <[email protected]> wrote:

> Are there valid use cases where the 3xx status codes would be used by a
> gadget? Does the default HttpFetcher follow redirects, or does it return
> and make the gadget do the following?
>

The immediate use case we have is one in which a gadget is making a request
to a stateful service, where the state lives on a particular set of
machines. Our frontends route to these machines only in the presence of a
particular argument -- otherwise, a redirect is served with that argument
attached. The gadget has logic to follow the redirect in this case.

The redirect doesn't happen by default in BasicHttpFetcher. By my search,
there's no place that sets HttpRequest.setFollowRedirects(true) in the
Shindig codebase as well. It's also not really clear to me that redirects
should be followed unless the client explicitly tells us to do so, in order
to be certain the security token isn't utilized improperly.


>
> Apart from the questions, the code looks fine.
>
>
Thanks for the look!

John



>
> http://codereview.appspot.com/152070
>

Reply via email to