Skip to content
Tcl Source Code Artifact [1d4ce8349e]
Login

Artifact [1d4ce8349e]

Artifact 1d4ce8349e6f92afc5c9f545aac582bda134b732f98a03c4b8fd8befd54f7a6f:

Ticket change [1d4ce8349e] - New ticket [338d979f5be43e5d|338d979f5b] <i>Image data without content type is corrupted by http package</i>. by sbron on 2020-07-24 20:07:22.
D 2020-07-24T20:07:22.932
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-wiki
J comment When\sa\sweb\ssite\sdoesn't\sprovide\sa\scontent\stype,\sRFC\s2616\sspecifies:\s"If\sand\sonly\sif\sthe\smedia\stype\sis\snot\sgiven\sby\sa\sContent-Type\sfield,\sthe\srecipient\sMAY\sattempt\sto\sguess\sthe\smedia\stype\svia\sinspection\sof\sits\scontent\sand/or\sthe\sname\sextension(s)\sof\sthe\sURI\sused\sto\sidentify\sthe\sresource.\sIf\sthe\smedia\stype\sremains\sunknown,\sthe\srecipient\sSHOULD\streat\sit\sas\stype\s"application/octet-stream".\sThe\shttp\spackage\sdoes\snot\sfollow\sthis\sdirective\sand\streats\sall\sdata\swith\san\sunknown\scontent\stype\sas\stext.\sThis\sis\san\sunfortunate\schoice,\sbecause\sonce\sconverted\sto\stext\s(translating\s\\r\\n\sto\s\\n),\sinformation\shas\sbeen\slost\sthat\scan't\sbe\srecovered.\sReporting\stext\sas\sbinary\sdata\son\sthe\sother\shand\scan\seasily\sbe\scorrected.\r\n\r\nAs\san\sexample,\sa\spopular\sDutch\sweb\ssite\sproduces\sa\spng\simage\swithout\sproviding\sa\scontent-type\sheader:\shttps://image.buienradar.nl/2.0/image/sprite/RadarMapRainNL.\sSee\salso\sthe\sattached\sscript.\r\n\r\nThe\sonly\swork-around\sis\sto\sadd\sthe\s-binary\soption\sto\shttp::geturl.\sBut\sthat\streats\sany\sresponse\sas\sbinary,\seven\swhen\sa\ssite\sdoes\sprovide\sa\scontent-type\sheader.
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 Image\sdata\swithout\scontent\stype\sis\scorrupted\sby\shttp\spackage
J type Bug
K 338d979f5be43e5d147f7a9c7d50eff9cd10917a
U sbron
Z 0c9c99db2c9f9d017107f61f5e1fe6d0