- if (strcmp (field, "Allow") == 0) {
- header.allow = value;
- } else if (strcmp (field, "Authorization") == 0) {
- header.authorization = value;
- } else if (strcmp (field, "Content-Encoding") == 0) {
- header.content_encoding = value;
- } else if (strcmp (field, "Content-Length") == 0) {
- header.content_length = value;
- } else if (strcmp (field, "Content-Type") == 0) {
- header.content_type = value;
- } else if (strcmp (field, "Date") == 0) {
- header.date = value;
- } else if (strcmp (field, "Expires") == 0) {
- header.expires = value;
- } else if (strcmp (field, "From") == 0) {
- header.from = value;
- } else if (strcmp (field, "If-Modified-Since") == 0) {
- header.if_modified_since = value;
- } else if (strcmp (field, "Last-Modified") == 0) {
- header.last_modified = value;
- } else if (strcmp (field, "Location") == 0) {
- header.location = value;
- } else if (strcmp (field, "Pragma") == 0) {
- header.pragma = value;
- } else if (strcmp (field, "Referer") == 0) {
- header.referer = value;
- } else if (strcmp (field, "Server") == 0) {
- header.server = value;
- } else if (strcmp (field, "User-Agent") == 0) {
- header.user_agent = value;
- } else if (strcmp (field, "WWW-Authenticate") == 0) {
- header.www_authenticate = value;
- } else {
- VERBOSE (WARNING, PRINT ("Unknown header field: '%s'\n", field));
- }
+ if (strcmp (field, "Allow") == 0) { header.allow = value; }
+ else if (strcmp (field, "Authorization") == 0) { header.authorization = value; }
+ else if (strcmp (field, "Content-Encoding") == 0) {
+ if (strcmp (value, "x-gzip") == 0) {
+ header.content_encoding = encoding_gzip_e;
+ } else if (strcmp (value, "x-compress") == 0) {
+ header.content_encoding = encoding_compress_e;
+ } else {
+ VERBOSE (WARNING, PRINT ("Unknown content encoding: %s\n", value));
+ }
+ } else if (strcmp (field, "Content-Length") == 0) { header.content_length = value; }
+ else if (strcmp (field, "Content-Type") == 0) { header.content_type = value; }
+ else if (strcmp (field, "Date") == 0) { header.date = value; }
+ else if (strcmp (field, "Expires") == 0) { header.expires = value; }
+ else if (strcmp (field, "From") == 0) { header.from = value; }
+ else if (strcmp (field, "If-Modified-Since") == 0) { header.if_modified_since = value; }
+ else if (strcmp (field, "Last-Modified") == 0) { header.last_modified = value; }
+ else if (strcmp (field, "Location") == 0) { header.location = value; }
+ else if (strcmp (field, "Pragma") == 0) { header.pragma = value; }
+ else if (strcmp (field, "Referer") == 0) { header.referer = value; }
+ else if (strcmp (field, "Server") == 0) { header.server = value; }
+ else if (strcmp (field, "User-Agent") == 0) { header.user_agent = value; }
+ else if (strcmp (field, "WWW-Authenticate") == 0) { header.www_authenticate = value; }
+ else { VERBOSE (WARNING, PRINT ("Unknown header field: '%s'\n", field)); }