]> granicus.if.org Git - curl/commitdiff
content_encoding: Add "none" alias to "identity"
authorMohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
Thu, 8 Feb 2018 18:23:22 +0000 (20:23 +0200)
committerJay Satiro <raysatiro@yahoo.com>
Fri, 9 Feb 2018 08:11:18 +0000 (03:11 -0500)
Some servers return a "content-encoding" header with a non-standard
"none" value.

Add "none" as an alias to "identity" as a work-around, to avoid
unrecognised content encoding type errors.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
Closes https://github.com/curl/curl/pull/2298

lib/content_encoding.c

index 46bef0ca94acd3a70ca2a943ce13b1935a487331..2b2188b7318426bd9974250b355e883ff969250b 100644 (file)
@@ -726,7 +726,7 @@ static void identity_close_writer(struct connectdata *conn,
 
 static const content_encoding identity_encoding = {
   "identity",
-  NULL,
+  "none",
   identity_init_writer,
   identity_unencode_write,
   identity_close_writer,