.
D 2020-07-24T16:13:23.717
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-wiki
J comment When\sa\sweb\ssite\sreturns\sa\sresource\swith\s"Content-Encoding:\sdeflate",\sthe\sdata\sshould\sbe\scompressed\saccording\sto\sRFC\s1951\sand\sthen\swrapped\saccording\sto\sRFC\s1950.\sThe\sproper\sway\sto\sdecode\ssuch\sa\sresource\sin\sTcl\sis\susing\sthe\szlib\s<b>decompress</b>\smethod,\snot\szlib\sinflate.\sThe\szlib\sinflate\smethod\sexpects\sraw\scompressed\sdata.\sApparently\sthis\swas\salso\simplemented\sincorrectly\sin\sIE,\sresulting\sin\ssome\sweb\ssites,\swhich\swere\sonly\stested\swith\sIE,\sto\sdeliver\sthe\swrong\sdata\sformat.\sTo\sdeal\swith\sthis\ssituation,\smost\sother\sbrowsers\swere\schanged\sto\saccept\sboth.\sEither\sTcl\sshould\salso\saccept\sboth,\sor\sthe\scorrect\sdata\sformat.\sNot\sonly\sthe\smisguided\sMicrosoft\sinterpretation.\r\n\r\nA\sContent-Encoding\svalue\sof\s"compress"\sspecifies\sthe\sdata\swas\sencoded\sthe\sway\sthe\sunix\s"compress"\scommand\sdoes.\sThe\szlib\slibrary\sdoes\snot\ssupport\sthis\sformat.\sAs\sit\sis\san\soutdated\sformat\sanyway,\sI\sthink\sthe\shttp\spackage\sshould\ssimply\snot\sadvertise\sits\ssupport\sin\sthe\sAccept-Encoding\sheader.\r\n\r\nUnfortunately\sI\shave\sbeen\sunsuccessful\sin\sfinding\sa\sweb\ssite\sthat\sreturns\sdeflated\sdata.\sProbably\sdue\sto\sthe\sMicrosoft\sblunder,\sthe\sdeflate\smethod\sis\sconsidered\stainted\sand\ssites\sdon't\suse\sit\smuch\sanymore.\sI\shave\screated\sa\sphp\sscript\son\smy\sown\sweb\ssite\sthat\swill\suse\seither\sgzip\sor\sdeflate\sencoding\sdepending\son\sthe\sreceived\sAccept-Encoding\sheader\s(using\sthe\sPHP\sfunction\sob_gzhandler,\swhich\spresumably\sproduces\sthe\scorrect\soutput).\sForcing\sthe\sAccept-Encoding\sheader\sto\s"deflate"\scauses\shttp::geturl\sto\sthrow\sa\s"data\serror":\r\n\r\n<verbatim>\r\npackage\srequire\shttp\s2.9.1\r\nset\surl\shttp://www.tclcode.com/bugs/deflate.php\r\nset\stok\s[http::geturl\s$url\s-headers\s{Accept-Encoding\sdeflate}]\r\nputs\s[http::data\s$tok]\r\nhttp::cleanup\s$tok\r\n</verbatim>
J foundin 2.9.1
J is_private 0
J login sbron
J priority 5\sMedium
J private_contact 8475f421649231f1e116ac602bea4537d2b027b4
J resolution None
J severity Minor
J status Open
J submitter sbron
J subsystem 29.\shttp\sPackage
J title The\shttp\spackage\suses\swrong\smapping\sfor\scontent-encoding
J type Bug
K a13b9d0ce1083eb302a9ad1ce88e7351c928fdd6
U sbron
Z 194bd71b6ab4e9aa7ca8d36df116c517