Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Commit

Permalink
Allow seekable methods to be used and let the current underlying stre…
Browse files Browse the repository at this point in the history
…am manage that.
  • Loading branch information
Adam Hathcock committed Jan 13, 2016
1 parent 1993a13 commit 53b5f3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Nancy/IO/RequestStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ public override bool CanRead
/// <summary>
/// Gets a value indicating whether the current stream supports seeking.
/// </summary>
/// <returns>Always returns <see langword="false"/>.</returns>
/// <returns>Returns depending on whether the stream is buffered or not.</returns>
public override bool CanSeek
{
get { return false; }
get { return this.stream.CanSeek; }
}

/// <summary>
Expand Down Expand Up @@ -312,7 +312,7 @@ public override int ReadByte()
/// <param name="origin">A value of type <see cref="T:System.IO.SeekOrigin"/> indicating the reference point used to obtain the new position. </param>
public override long Seek(long offset, SeekOrigin origin)
{
throw new NotSupportedException();
return this.stream.Seek(offset, origin);
}

/// <summary>
Expand All @@ -323,7 +323,7 @@ public override long Seek(long offset, SeekOrigin origin)
/// <remarks>This functionality is not supported by the <see cref="RequestStream"/> type and will always throw <see cref="NotSupportedException"/>.</remarks>
public override void SetLength(long value)
{
throw new NotSupportedException();
this.stream.SetLength(value);
}

/// <summary>
Expand Down

0 comments on commit 53b5f3f

Please sign in to comment.