http_recv: Fix reading of the HTTP OK message pattern.
[paraslash.git] / http_recv.c
index 2e518b2..c7eb485 100644 (file)
@@ -119,7 +119,7 @@ static void http_recv_post_select(struct sched *s, struct task *t)
        if (!FD_ISSET(phd->fd, &s->rfds))
                return;
        if (phd->status == HTTP_SENT_GET_REQUEST) {
-               t->error = recv_pattern(phd->fd, HTTP_OK_MSG, MAXLINE);
+               t->error = recv_pattern(phd->fd, HTTP_OK_MSG, strlen(HTTP_OK_MSG));
                if (t->error >= 0) {
                        PARA_INFO_LOG("received ok msg, streaming\n");
                        phd->status = HTTP_STREAMING;