You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Andrew Gaul <ga...@apache.org> on 2019/02/07 21:59:32 UTC

Re: Missing support in jclouds s3 API to handle “307 temporary redirect”response to a PUT with header "Expect: 100-continue"

On Thu, Feb 07, 2019 at 12:18:48AM -0000, brent.williams@gmail.com wrote:
> Can anyone confirm this apparent lack of support for the 307 redirect?  Such handling is critical for our use-case (new hardware under development).  We'd be interested in supplying a patch if we can confirm this functionality is not yet implemented.  

S3RedirectionRetryHandler handles 301 and 307:

https://github.com/apache/jclouds/blob/624367dfbf4f6b86bc53aa2a7ac14c8db02533f3/apis/s3/src/main/java/org/jclouds/s3/handlers/S3RedirectionRetryHandler.java#L50

Which situations do you see these codes?  Usually they result from using
the wrong region for a bucket in an endpoint.

-- 
Andrew Gaul
http://gaul.org/

Re: Missing support in jclouds s3 API to handle “307 temporary redirect” response to a PUT with header "Expect: 100-continue"

Posted by Ignasi Barrera <na...@apache.org>.
Also jclouds should already support the 307 redirect. All 3xx response
codes are intercepted here [1], then processed, by default (unless a
provider defines its own redirection retry handler) here [2].

In general, the preconditions for a 307 request to be retried by jclouds
are:
* It must be replyable (usually this means a request which payload is not a
stream that may be already consumed).
* The 3xx response contains the new URI in the Location header.


[1]
https://github.com/apache/jclouds/blob/master/core/src/main/java/org/jclouds/http/handlers/DelegatingRetryHandler.java#L64-L65
[2]
https://github.com/apache/jclouds/blob/master/core/src/main/java/org/jclouds/http/handlers/RedirectionRetryHandler.java#L59

On Thu, 7 Feb 2019 at 22:59, Andrew Gaul <ga...@apache.org> wrote:

> On Thu, Feb 07, 2019 at 12:18:48AM -0000, brent.williams@gmail.com wrote:
> > Can anyone confirm this apparent lack of support for the 307 redirect?
> Such handling is critical for our use-case (new hardware under
> development).  We'd be interested in supplying a patch if we can confirm
> this functionality is not yet implemented.
>
> S3RedirectionRetryHandler handles 301 and 307:
>
>
> https://github.com/apache/jclouds/blob/624367dfbf4f6b86bc53aa2a7ac14c8db02533f3/apis/s3/src/main/java/org/jclouds/s3/handlers/S3RedirectionRetryHandler.java#L50
>
> Which situations do you see these codes?  Usually they result from using
> the wrong region for a bucket in an endpoint.
>
> --
> Andrew Gaul
> http://gaul.org/
>