diff options
Diffstat (limited to 'src/DotNetOpenAuth/Messaging/HttpRequestInfo.cs')
-rw-r--r-- | src/DotNetOpenAuth/Messaging/HttpRequestInfo.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth/Messaging/HttpRequestInfo.cs b/src/DotNetOpenAuth/Messaging/HttpRequestInfo.cs index cfc122d..418f6b2 100644 --- a/src/DotNetOpenAuth/Messaging/HttpRequestInfo.cs +++ b/src/DotNetOpenAuth/Messaging/HttpRequestInfo.cs @@ -234,7 +234,10 @@ namespace DotNetOpenAuth.Messaging { if (this.form == null) { if (this.HttpMethod == "POST" && this.Headers[HttpRequestHeader.ContentType] == "application/x-www-form-urlencoded") { StreamReader reader = new StreamReader(this.InputStream); - long originalPosition = this.InputStream.Position; + long originalPosition = 0; + if (this.InputStream.CanSeek) { + originalPosition = this.InputStream.Position; + } this.form = HttpUtility.ParseQueryString(reader.ReadToEnd()); if (this.InputStream.CanSeek) { this.InputStream.Seek(originalPosition, SeekOrigin.Begin); |