DescriptionAdd support for Rietveld instance that permanently moved by support HTTP 301.
Before this change, HTTP 301 would result in a permement error. Update upload.py
to accept HTTP 301 and uses the right host to get a cookie against. It results
in a slower operation due to the additional requests but makes a much smoother
transition while updating the links to the new rietveld instance.
Tested manually against an instance that returns HTTP 301 on all request to
a rietveld instance in a different domain.
BUG=248
TEST=Tested with a real instance being moved
Patch Set 1 #Patch Set 2 : Fix compatibility for python 2.4 #Patch Set 3 : Forgot to increment tries #Patch Set 4 : Propagate host to _GetAuthToken() to make it coherent #
Total comments: 2
Patch Set 5 : Simplified a lot, doesn't need to handle 301 during cookie retrieval #MessagesTotal messages: 8
|