diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2013-10-21 21:41:21 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2013-10-21 21:41:21 +0000 |
commit | dfc45c1b9747509391a232c1c6e9ba9aaf0a317a (patch) | |
tree | 3f94ff2a650a229ce5d6a32dd8f27d0465891a0d /cups/http.c | |
parent | e52a14430316681f90984b599be900a889195f73 (diff) | |
download | cups-dfc45c1b9747509391a232c1c6e9ba9aaf0a317a.tar.gz |
Fix httpWriteResponse state values after a 0-length response.
Fix text/css MIME type rules (so css files don't get mistaken for C source)
New web interface templates and stylesheet that works better on mobile
browsers like the iPhone.
Touch icon for mobile bookmarks.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11349 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cups/http.c')
-rw-r--r-- | cups/http.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cups/http.c b/cups/http.c index 6e532c76b..1881d5027 100644 --- a/cups/http.c +++ b/cups/http.c @@ -3453,7 +3453,8 @@ httpWrite2(http_t *http, /* I - HTTP connection */ if (http->state == HTTP_STATE_POST_RECV) http->state ++; - else if (http->state == HTTP_STATE_POST_SEND) + else if (http->state == HTTP_STATE_POST_SEND || + http->state == HTTP_STATE_GET_SEND) http->state = HTTP_STATE_WAITING; else http->state = HTTP_STATE_STATUS; @@ -3647,6 +3648,14 @@ httpWriteResponse(http_t *http, /* I - HTTP connection */ http_set_length(http); + if (http->data_encoding == HTTP_ENCODING_LENGTH && http->data_remaining == 0) + { + DEBUG_printf(("1httpWriteResponse: Resetting state to HTTP_STATE_WAITING, " + "was %s.", httpStateString(http->state))); + http->state = HTTP_STATE_WAITING; + return (0); + } + #ifdef HAVE_LIBZ /* * Then start any content encoding... @@ -3656,6 +3665,7 @@ httpWriteResponse(http_t *http, /* I - HTTP connection */ http_content_coding_start(http, httpGetField(http, HTTP_FIELD_CONTENT_ENCODING)); #endif /* HAVE_LIBZ */ + } return (0); |