You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Stephan Erb <st...@dev.static-void.de> on 2015/06/30 22:44:26 UTC
Review Request 36064: Perform leader redirect using HTTP status code
307
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36064/
-----------------------------------------------------------
Review request for Aurora, Joshua Cohen and Kevin Sweeney.
Repository: aurora
Description
-------
Perform leader redirect using HTTP status code 307.
The scheduler used to redirect to its leading master using the HTTP status code `302 Found`. Many browsers (including utilities like curl and python requests) implement this status code wrongly. They are changing all PUT and POST requests to GET (see https://en.wikipedia.org/wiki/HTTP_302). By using the the new HTTP/1.1 code `307 Temporary Redirect` we remedy this situation.
Aurora is already using status code `307` within the MNAME-Feature. By using it also for the leader redirect, we enable users to run commands like `curl -X PUT http://non-leading-master/mname/...`
Diffs
-----
src/main/java/org/apache/aurora/scheduler/http/LeaderRedirectFilter.java 1c2b08de1e2c470d32baeb845ae0e0a7ce2b75aa
src/test/java/org/apache/aurora/scheduler/http/ServletFilterTest.java f8b134fa1f3fbbd7affef31acb077e7acd4f9761
Diff: https://reviews.apache.org/r/36064/diff/
Testing
-------
./gradlew -Pq build
Thanks,
Stephan Erb
Re: Review Request 36064: Perform leader redirect using HTTP status
code 307
Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36064/#review89968
-----------------------------------------------------------
Ship it!
Master (616ef10) is green with this patch.
./build-support/jenkins/build.sh
I will refresh this build result if you post a review containing "@ReviewBot retry"
- Aurora ReviewBot
On June 30, 2015, 8:44 p.m., Stephan Erb wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36064/
> -----------------------------------------------------------
>
> (Updated June 30, 2015, 8:44 p.m.)
>
>
> Review request for Aurora, Joshua Cohen and Kevin Sweeney.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Perform leader redirect using HTTP status code 307.
>
> The scheduler used to redirect to its leading master using the HTTP status code `302 Found`. Many browsers (including utilities like curl and python requests) implement this status code wrongly. They are changing all PUT and POST requests to GET (see https://en.wikipedia.org/wiki/HTTP_302). By using the the new HTTP/1.1 code `307 Temporary Redirect` we remedy this situation.
>
> Aurora is already using status code `307` within the MNAME-Feature. By using it also for the leader redirect, we enable users to run commands like `curl -X PUT http://non-leading-master/mname/...`
>
>
> Diffs
> -----
>
> src/main/java/org/apache/aurora/scheduler/http/LeaderRedirectFilter.java 1c2b08de1e2c470d32baeb845ae0e0a7ce2b75aa
> src/test/java/org/apache/aurora/scheduler/http/ServletFilterTest.java f8b134fa1f3fbbd7affef31acb077e7acd4f9761
>
> Diff: https://reviews.apache.org/r/36064/diff/
>
>
> Testing
> -------
>
> ./gradlew -Pq build
>
>
> Thanks,
>
> Stephan Erb
>
>
Re: Review Request 36064: Perform leader redirect using HTTP status
code 307
Posted by Kevin Sweeney <ke...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36064/#review90181
-----------------------------------------------------------
Ship it!
src/main/java/org/apache/aurora/scheduler/http/LeaderRedirectFilter.java (line 46)
<https://reviews.apache.org/r/36064/#comment143178>
Use the `HttpHeaders.LOCATION` constant here instead.
- Kevin Sweeney
On June 30, 2015, 1:44 p.m., Stephan Erb wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36064/
> -----------------------------------------------------------
>
> (Updated June 30, 2015, 1:44 p.m.)
>
>
> Review request for Aurora, Joshua Cohen and Kevin Sweeney.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Perform leader redirect using HTTP status code 307.
>
> The scheduler used to redirect to its leading master using the HTTP status code `302 Found`. Many browsers (including utilities like curl and python requests) implement this status code wrongly. They are changing all PUT and POST requests to GET (see https://en.wikipedia.org/wiki/HTTP_302). By using the the new HTTP/1.1 code `307 Temporary Redirect` we remedy this situation.
>
> Aurora is already using status code `307` within the MNAME-Feature. By using it also for the leader redirect, we enable users to run commands like `curl -X PUT http://non-leading-master/mname/...`
>
>
> Diffs
> -----
>
> src/main/java/org/apache/aurora/scheduler/http/LeaderRedirectFilter.java 1c2b08de1e2c470d32baeb845ae0e0a7ce2b75aa
> src/test/java/org/apache/aurora/scheduler/http/ServletFilterTest.java f8b134fa1f3fbbd7affef31acb077e7acd4f9761
>
> Diff: https://reviews.apache.org/r/36064/diff/
>
>
> Testing
> -------
>
> ./gradlew -Pq build
>
>
> Thanks,
>
> Stephan Erb
>
>
Re: Review Request 36064: Perform leader redirect using HTTP status
code 307
Posted by Stephan Erb <st...@dev.static-void.de>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36064/
-----------------------------------------------------------
(Updated July 5, 2015, 9:25 p.m.)
Review request for Aurora, Joshua Cohen and Kevin Sweeney.
Changes
-------
Use constant for location header.
Repository: aurora
Description
-------
Perform leader redirect using HTTP status code 307.
The scheduler used to redirect to its leading master using the HTTP status code `302 Found`. Many browsers (including utilities like curl and python requests) implement this status code wrongly. They are changing all PUT and POST requests to GET (see https://en.wikipedia.org/wiki/HTTP_302). By using the the new HTTP/1.1 code `307 Temporary Redirect` we remedy this situation.
Aurora is already using status code `307` within the MNAME-Feature. By using it also for the leader redirect, we enable users to run commands like `curl -X PUT http://non-leading-master/mname/...`
Diffs (updated)
-----
src/main/java/org/apache/aurora/scheduler/http/LeaderRedirectFilter.java 1c2b08de1e2c470d32baeb845ae0e0a7ce2b75aa
src/test/java/org/apache/aurora/scheduler/http/ServletFilterTest.java f8b134fa1f3fbbd7affef31acb077e7acd4f9761
Diff: https://reviews.apache.org/r/36064/diff/
Testing
-------
./gradlew -Pq build
Thanks,
Stephan Erb