- parse headers in a systematic way using a header parser written for the
purpose. this makes keeping header parsing free of bugs much less of a hassle.
with simple unittest - it actually helped me *a lot* so it's better than
nothing. it should be pretty fast, too. in a test it parsed ~13 MB of headers
per second on my phenom at 2GHz; this indicates that the old ad-hoc parser was
likely not a bottleneck ;)
- some "safe" parsing helpers that know not to overflow a buffer and with clear
semantics (advancing the read pointer if they recognize what they are made to
recognize).
- dump the gets() / rewind() / setRewindMarker() business and replace it by
unread() which puts data back into the input stream with less head-scratching
about what exactly it does. unread is both less complex and requires less
variables in the already crowded HTTProtocol class.
- do not override read() because it's confusing. call the method to achieve the
same goal (mainly unread support) readBuffered() instead.
- adapt getAuthorization() to pre-parsed headers
- small improvements like collapsing of switch cases and kdelibs-style
formatting in significantly changed methods
- some explanatory comments
- some performance tweaking - real-world performance (i.e. loading websites)
is hopefully better than before. mainly experimenting with buffer sizes and
how exactly to read incoming data.
IIRC this included the funny new code in readChunked().
- probably something I forgot
- fix some small behavior bugs in header parsing, mainly in case of somehow
incorrect headers though
- quite some testing to kill any bugs introduced. we'll see about the bugs...
- primitive multi-get support, not completely ready to use though. easier to
commit it than to remove it for the checkin.
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs@856450 283d02a7-25f6-0310-bc7c-ecb5cbfe19da