guzzle/streams — pull request #23 by checat (2014-09-14 21:30:58+00:00)
Title: Fix LimitStream::seek() to accept relative offset

Currently, `$stream->seek($x); $x=$stream->tell() ` are not symmetric, x will change if the LimitStream offset is not 0.

Also, LimitStream::seek() expects its argument to be an absolute offset in the wrapped stream, not relative to the offset. This breaks the abstraction.

This pull request fixes the LimitStream::seek() so it expects an offset in range 0..limit relative to offset and then tell() will properly return the same value.