summaryrefslogtreecommitdiff
path: root/libwaitress/src
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2009-05-03 20:54:06 +0200
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2009-05-03 20:54:06 +0200
commitb5ac68a1d865b6252a31d17c36ae8c80aea5f8f4 (patch)
tree5cf453dd3e81c54ba1eb8ab63bae68a7d3046fd2 /libwaitress/src
parent2605e4b8ab511221b14b07f32ff78a69c491b9cc (diff)
downloadpianobar-windows-b5ac68a1d865b6252a31d17c36ae8c80aea5f8f4.tar.gz
pianobar-windows-b5ac68a1d865b6252a31d17c36ae8c80aea5f8f4.tar.bz2
pianobar-windows-b5ac68a1d865b6252a31d17c36ae8c80aea5f8f4.zip
Fix range header, accept 206 status code
Diffstat (limited to 'libwaitress/src')
-rw-r--r--libwaitress/src/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libwaitress/src/main.c b/libwaitress/src/main.c
index f51d991..f9ec460 100644
--- a/libwaitress/src/main.c
+++ b/libwaitress/src/main.c
@@ -289,8 +289,9 @@ WaitressReturn_t WaitressFetchCall (WaitressHandle_t *waith) {
read (sockfd, statusBuf, sizeof (statusBuf));
switch (statusBuf[0]) {
case '2':
- if (statusBuf[1] == '0' && statusBuf[2] == '0') {
- /* 200 OK */
+ if (statusBuf[1] == '0' &&
+ (statusBuf[2] == '0' || statusBuf[2] == '6')) {
+ /* 200 OK/206 Partial Content */
} else {
CLOSE_RET (WAITRESS_RET_STATUS_UNKNOWN);
}