From 82ca4cf8ce421cbec87667f6c22b3e7165443016 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:10 +0200 Subject: added InputStream.ready The flag "ready" indicates whether the input stream is ready and it has parsed all meta data. Previously, it was impossible for decodeStart() to see the content type of HTTP input streams, because at that time, the HTTP response wasn't parsed yet. --- src/inputStream_http.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/inputStream_http.c') diff --git a/src/inputStream_http.c b/src/inputStream_http.c index 3e99b0475..ace6da4ce 100644 --- a/src/inputStream_http.c +++ b/src/inputStream_http.c @@ -598,6 +598,7 @@ found: xclose(data->fd); data->fd = -1; data->state = CONN_STATE_REDIRECT; + is->ready = 1; return 0; /* success */ } return -1; @@ -696,6 +697,7 @@ static int recv_response(InputStream * is) ringbuf_writer_reset(data->rb); data->state = CONN_STATE_PREBUFFER; + is->ready = 1; return 0; } -- cgit v1.2.3