]> git.tuebingen.mpg.de Git - paraslash.git/commit
http_recv: Fix reading of the HTTP OK message pattern.
authorAndre Noll <maan@systemlinux.org>
Sat, 22 Nov 2008 16:49:39 +0000 (17:49 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 22 Nov 2008 16:49:39 +0000 (17:49 +0100)
commit7ddeb416451e763677f1638263e26e0855d79d91
treecfc40b2516d1fb63252e75b6c59290450fb1d3dd
parent8f3685d67bcec78c7028eedc9ee0fcaefb3aa13f
http_recv: Fix reading of the HTTP OK message pattern.

This bug leads to sound artefacts at the beginning of the
stream caused by calling recv_pattern() with a buffer size
larger than the HTTP OK message.

It may thus happen that the buffer used by recv_pattern() contains
not only the HTTP OK message but also the beginning of the stream.
Since that buffer is discarded by recv_pattern(), the first few
bytes of the stream are lost if this happens.

Fix it by passing the exact length of the HTTP OK message to
recv_pattern().
http_recv.c