chunky parser: only rewind if needed
authorDaniel Stenberg <daniel@haxx.se>
Tue, 7 Sep 2010 16:22:54 +0000 (18:22 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 7 Sep 2010 16:29:03 +0000 (18:29 +0200)
commit18a758d9078f506ecfb995ef5ece46a83887a5da
tree1ee558e8d628fedf78acb7a207d645705bbbab35
parent7aea2d522df515a71447998e9875638ccac7b4b5
chunky parser: only rewind if needed

The code reading chunked encoding attempts to rewind the code if it had
read more data than the chunky parser consumes. The rewinding can fail
and it will then cause an error. This change now makes the rewinding
only happen if pipelining is in use - as that's the only time it really
needs to be done.

Bug: http://curl.haxx.se/mail/lib-2010-08/0297.html
Reported by: Ron Parker
lib/transfer.c