Hi, On 14 Sep 2017 12:22 am, "Julian Reschke" <julian.resc...@gmx.de> wrote:
On 2017-09-14 01:29, Ian Boston wrote: > Hi, > Here is an updated patch. > > https://github.com/apache/sling/compare/trunk...ieb:OAK-6575-3-1?expand=1 > > Best Regards > Ian > 1) I think it would be good to only redirect HEAD and GET (may already be the case...) This is already the case, but looking at the code, should it redirect for HEAD, or should HEAD still be served by Sling ? (I havent checked the spec). Sling has all the information needed for a HEAD response, although it might not be exactly the same as the HEAD response from the target of the redirect. If the target of the redirect is CloudFront, then I would expect it to respond with headers consistent with its behaviour. I would also expect the target of the redirect to change, as the signature in the query params will change on each fresh redirect. Is that going to cause a problem ? At the moment, it does redirect for HEAD. https://github.com/apache/sling/compare/trunk...ieb:OAK-6575-3-1?expand=1#diff-1af2bf2ffe55daf032f4c7419a84576fR171 2) For robustness in case a redirect *does* happen for POST, HTTP status 307 seems to be more correct than the default 302. Best regards, Julian StreamRenderServlet implements SlingSafeMethodsServlet so doenst handl POST requests. https://github.com/ieb/sling/blob/a491430a8b30ec84ef66985f3af81a758eab6022/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java#L64 Best Regards Ian