Commit bd3a5c82 authored by nextime's avatar nextime

Fix a redirect loop

parent 72132f93
...@@ -149,6 +149,8 @@ class HTTPPageGetter(client.HTTPPageGetter): ...@@ -149,6 +149,8 @@ class HTTPPageGetter(client.HTTPPageGetter):
self.handleStatusDefault() self.handleStatusDefault()
return return
url = l[0] url = l[0]
if self.factory.path==url and self.factory.method=="POST":
self.factory.method="GET"
if self.followRedirect: if self.followRedirect:
scheme, host, port, path = \ scheme, host, port, path = \
client. _parse(url, defaultPort=self.transport.getPeer().port) client. _parse(url, defaultPort=self.transport.getPeer().port)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment