diff options
Diffstat (limited to 'WWW/Library/Implementation/HTMIME.c')
-rw-r--r-- | WWW/Library/Implementation/HTMIME.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c index efa54e4e..49791955 100644 --- a/WWW/Library/Implementation/HTMIME.c +++ b/WWW/Library/Implementation/HTMIME.c @@ -15,6 +15,7 @@ #include <HTMIME.h> /* Implemented here */ #include <HTTP.h> /* for redirecting_url */ #include <HTAlert.h> +#include <HTFile.h> #include <HTCJK.h> #include <UCMap.h> #include <UCDefs.h> @@ -168,14 +169,17 @@ void HTMIME_TrimDoubleQuotes(char *value) value[i] = cp[(i + 1)]; } +/* + * Check if the token from "Content-Encoding" corresponds to a compression + * type. + */ static BOOL content_is_compressed(HTStream *me) { char *encoding = me->anchor->content_encoding; + BOOL result = (HTEncodingToCompressType(encoding) != cftNone); - return encoding != 0 - && strcmp(encoding, "8bit") != 0 - && strcmp(encoding, "7bit") != 0 - && strcmp(encoding, "binary") != 0; + CTRACE((tfp, "content is%s compressed\n", result ? "" : " NOT")); + return result; } /* |