Skip to content

Commit

Permalink
follow redirect for POST/PUT. Backported
Browse files Browse the repository at this point in the history
svn path=/branches/mono-1-1-7/mcs/; revision=60053
  • Loading branch information
gonzalop committed Apr 28, 2006
1 parent e1ff2e3 commit 5e91900
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mcs/class/System/System.Net/HttpWebRequest.cs
Expand Up @@ -807,8 +807,10 @@ bool Redirect (WebAsyncResult result, HttpStatusCode code)
case HttpStatusCode.MovedPermanently: // 301
case HttpStatusCode.Redirect: // 302
case HttpStatusCode.TemporaryRedirect: // 307
/* MS follows the redirect for POST too
if (method != "GET" && method != "HEAD") // 10.3
return false;
*/

uriString = webResponse.Headers ["Location"];
break;
Expand Down

0 comments on commit 5e91900

Please sign in to comment.