aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Farner" <wfar...@apache.org>
Subject Re: Review Request 36064: Perform leader redirect using HTTP status code 307
Date Wed, 08 Jul 2015 21:55:48 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36064/#review91003
-----------------------------------------------------------

Ship it!


Ship It!

- Bill Farner


On July 5, 2015, 7:38 p.m., Stephan Erb wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36064/
> -----------------------------------------------------------
> 
> (Updated July 5, 2015, 7:38 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> 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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message