#470 HTTP streams' tellg() method is bad!

open
nobody
Net (141)
5
2012-09-14
2011-09-04
Anonymous
No

HTTPFixedLengthInputStream and HTTPChunkedInputStream's tellg() method always returns -1.

After my test, I found seekoff(), which is a virtual method in ios::streambuf,
is not implemented in HTTPFixedLengthStreamBuf and HTTPChunkedStreamBuf.

I have also found that seekoff() is implemented in FileStreamBuf, so Poco::FileStreamIOS works well when tellg() method is called!

Below is my tellg() method test file for HTTPFixedLengthInputStream and HTTPChunkedInputStream. I run it with vs2005 + Poco1.41p1.

Sorry for my bad english.

Discussion

  • tellg() method test file for HTTPFixedLengthInputStream and HTTPChunkedInputStream

     
    Attachments
  • HTTP streams (and also SocketStream, etc.) do not support random access (seeking), therefore we don't implement seekoff().