Skip to content
Tcl Source Code Artifact [09db90cdff]
Login

Artifact [09db90cdff]

Artifact 09db90cdff543f59d26433c1c4ca625be69879a4:

Ticket change [09db90cdff] - New ticket [838e99a76dd54f19|838e99a76d] <i>treat application/xml as text</i>. by gahr on 2016-09-24 19:00:46.
D 2016-09-24T19:00:46.738
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment The\shttp\spackage\sconverts\sthe\sbody\sof\sthe\sresponse\sto\sthe\scharset\sspecified\sin\sthe\sresponse\sheaders\sonly\sif\scontent-type\smatches\stext*.\sThis\spatch\sproposes\sto\streat\sapplication/xml\sin\sthe\ssame\sway.\sThe\srationale\sis\sthat\sxml\sis\sencoded\sin\sutf-8\sby\sdefault\sand\scarries\shuman\sreadable\sinformation.\r\nCurrently,\sanybody\sreceiving\s*/xml\sshould\sdecode\sthe\sstream\shimself,\sas\ssuggested\sin\s[1733261fffffffffffff].\sI\sfind\sthis\scounterintuitive.\r\n\r\nA\sreal-world\suse\scase\sfor\sthis\sis\sWebDAV,\swhich\shas\sdeprecated\sthe\suse\sof\stext/xml\sin\sfavour\sof\sapplication/xml,\ssee\srfc\s4918\s§8.2\s[http://www.webdav.org/specs/rfc4918.html#rfc.section.8.2]\r\n\r\nI\spropose\sthe\sfollowing\spatch.\r\n\r\nIndex:\slibrary/http/http.tcl\r\n==================================================================\r\n---\slibrary/http/http.tcl\r\n+++\slibrary/http/http.tcl\r\n@@\s-1045,11\s+1045,15\s@@\r\n\s\r\n\s\s\s\s\s\s\s\s\s\s\s\s#\sWe\shave\sto\suse\sbinary\stranslation\sto\scount\sbytes\sproperly.\r\n\s\s\s\s\s\s\s\s\s\s\s\sfconfigure\s$sock\s-translation\sbinary\r\n\s\r\n\s\s\s\s\s\s\s\s\s\s\s\sif\s{\r\n-\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s$state(-binary)\s||\s![string\smatch\s-nocase\stext*\s$state(type)]\r\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s$state(-binary)\s||\r\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s(\r\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s![string\smatch\s-nocase\stext*\s$state(type)]\s&&\r\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s![string\smatch\s-nocase\sapplication/xml*\s$state(type)]\r\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s)\r\n\s\s\s\s\s\s\s\s\s\s\s\s}\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s#\sTurn\soff\sconversions\sfor\snon-text\sdata\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sset\sstate(binary)\s1\r\n\s\s\s\s\s\s\s\s\s\s\s\s}\r\n\s\s\s\s\s\s\s\s\s\s\s\sif\s{[info\sexists\sstate(-channel)]}\s{
J foundin 8.6.6
J is_private 0
J login gahr
J priority 5\sMedium
J private_contact 438e59f1f1c891b29d2528ed82d1e629cecc6336
J resolution None
J severity Minor
J status Open
J submitter gahr
J subsystem 29.\shttp\sPackage
J title treat\sapplication/xml\sas\stext
J type Bug
K 838e99a76dd54f1961b8b5c4bdb3da114bf5b6f8
U gahr
Z a563ae35cf154404e6a830c7d220fcd0