Allow TOS redirect. Fix upload finished detection when redirecting.

This fixes https://code.google.com/p/singularity-viewer/issues/detail?id=705

Adds 'bool redirect_status_ok(void) const { return true; }' to LLIamHere,
because it's ok to receive a 302 status there. Likewise added to LLIamHereVoice,
because that has the same comment in its error() method.

Also fixes the problem that if two redirects occur on a row, then the
upload_finished detection asserted because it would detect the third
time that libcurl turned off writing to the socket as a failure (the
second time wasn't a problem because mUploadFinished was reset upon
receiving the first 302 header, but not upon receiving the second
header).
This commit is contained in:
Aleric Inglewood
2013-03-25 04:41:07 +01:00
parent 2916d9353e
commit b20886a481
5 changed files with 41 additions and 8 deletions

View File

@@ -104,6 +104,7 @@ class LLIamHereVoice : public LLHTTPClient::ResponderWithResult
};
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return iamHereVoice_timeout; }
/*virtual*/ bool redirect_status_ok(void) const { return true; }
/*virtual*/ char const* getName(void) const { return "LLIamHereVoice"; }
};