: <i>The http package uses wrong mapping for content-encoding</i> plus 4 other changes
by
.
D 2022-09-11T11:02:50.979
J icomment The\sexisting\shttp\sallows\s"Content-Encoding:\sgzip,deflate,compress".\r\nOf\sthese\soptions,\sgzip\sis\sby\sfar\sthe\smost\scommonly\sused.\r\n\r\nCommit\s[d482da7d8c]\simplements\sthe\ssuggestions\smade\sin\sthe\sbug\sreport\s(above):\r\n(a)\sit\sremoves\soption\s"compress"\swhich\sappears\sto\suse\sthe\swrong\salgorithm;\r\n(b)\sit\sallows\soption\s"deflate"\sto\suse\seither\sthe\sRFC-compliant\sformat,\sor\sthe\sMicrosoft-inspired\snon-compliant\s"raw"\sformat\s(except\sthat\sa\s-channel\suses\sonly\sthe\scompliant\sformat).\r\n\r\nRe\s"compress":\r\n\r\nRFC\s9110\sSec\s8.4.1.1\sstates\r\n\r\n\s\s\sThe\s"compress"\scoding\sis\san\sadaptive\sLempel-Ziv-Welch\s(LZW)\scoding\r\n\s\s\s[Welch]\sthat\sis\scommonly\sproduced\sby\sthe\sUNIX\sfile\scompression\r\n\s\s\sprogram\s"compress".\r\n\r\nThe\soutput\sof\s"zlib\scompress"\sappears\snot\sto\sbe\sin\s"UNIX\scompress"\sformat.\s\sThe\scommand-line\stools\scompress/decompress\sand\sthe\sTcl\scommands\s"zlib\scompress"/"zlib\sdecompress"\scannot\sinteroperate.\s\sIt\sappears\stherefore\sthat\sthe\sTcl\simplementation\sis\sincorrect.\s\sI\shave\sremoved\sthe\s"compress"\soption\sfrom:\r\n(1)\sthe\sdefault\svalue\sof\s"Accept-Encoding"\r\n(2)\sthe\soptions\simplemented\sin\shttp::ContentEncoding\r\n(3)\shttp(n)\r\n\r\nTests\shave\sbeen\smodified\saccordingly.\r\n\r\nIn\sview\sof\sthe\sunpopularity\sof\s"compress"\son\sWeb\sservers,\sit\sdoes\snot\sseem\sworthwhile\sto\sattempt\sto\sfix\sthe\sformat\sin\shttp.
J login kjnash
J mimetype text/x-fossil-plain
J resolution Fixed
J status Pending
K a13b9d0ce1083eb302a9ad1ce88e7351c928fdd6
U kjnash
Z 57ffd636f3023f4b6c7f476fde2ee0c4