Use stream wrapper that allows to seek HTTP files

We want to start pushing to client connecting to owncloud the content of files stored on a remote DAV server while we are still downloading 
it from the remote server without waiting to first fully download the file on the owncloud server. We cannot directly use fopen('http://...') because
we want to be able to seek the resource, instead we use the stream wrapper implemented here.

Some things on which feedback would be very useful: 
 - is the wrapper implementing enough functions or some are missing?
 - what is the best way to create unit tests for this code?
Instead of messing with urlencoding it's a lot easier to pass all the options a stream context