Artifact
f41322095ba663d63ed1e8bb647ec39e8afead87:
Ticket change
[f41322095b]
- New ticket
[2874782fffffffff|2874782fff] <i>http 2.7.2 fails to correctly parse input </i>.
by
cwjolly on
2009-10-08 15:04:09.
D 2009-10-08T15:04:09
J assignee patthoyts
J cmimetype text/plain
J comment The\shttp\sevent\shandler\sfunction\sdoes\snot\shandle\sweb\sservers\sthat\sput\sin\sblank\slines\sahead\sof\sthe\shttp\sresponse\sheader.\s\sThis\sis\snot\sto\sstandard\s\sbut\s\sI\sbelieve\sthe\sfix\sI\sam\ssuggesting\sdoes\snot\sharm\sother\sweb\sservers\sthat\sdo\sreturn\sthe\sstatus\son\sthe\sfirst\sline.\s\sI\sam\sconnecting\sto\sa\swebserver\sthat\ssends\sback\sthe\sfollowing\sto\sa\sGET\srequest\s:\n---------------------------\n\\n\n\\n\n\\n\nHTTP/1.1\s200\sFile\sFollows\n\\n\n.....\n-------\nwithout\sthe\ssuggested\schange\sthe\scurrent\s2.7.2\sversion\sof\shttp.tm\sfiles\sto\sparse\sthe\sreply.\sThe\sstatus\sis\sblank\sand\sthe\smetadata\sholds\sthe\scontents\sof\sthe\sbody.\sThis\stotally\sscrews\sup\sthe\sretrieval\sof\selements\susing\sthe\shttp\sapi.\sThe\sfollowing\schange\swill\snot\sset\sthe\sheader\suntil\sit\sgets\sa\snon\sblank\sline.\s\sThe\srelevant\sportions\sare\sshown;\sall\sother\scode\shas\sbeen\sremoved\sfor\sthe\ssake\sof\sbrevity.\s\n\n\sThe\shttp::Event\sproc\sneeds\sto\sbe\smodified\sfrom\s:\s\n\n#\scurrent\sversion\s2.7.2\nproc\shttp::Event\s{\ssocket\stoken\s}\s{\n....\n\sif\s{$state(state)\seq\s"connecting"}\s{\nset\sstate(state)\s"header"\nif\s{[catch\s{gets\s$sock\sstate(http)}\sn]}\s{\n\s\s\s\sreturn\s[Finish\s$token\s$n]\n}\n\s\s\s\s}\n...\n}\n\nto\s:\n\n#\ssuggested\supdate\nproc\shttp::Event\s{\ssoket\stoken\s}\s{\n....\n\s\s\sif\s{$state(state)\seq\s"connecting"}\s{\nif\s{[catch\s{gets\s$sock\sstate(http)}\sn]}\s{\n\s\s\s\sreturn\s[Finish\s$token\s$n]\n}\selse\s{\n\s\s\s\s\s\sif\s{\s[string\slength\s$state(http)\s]\s>\s0\s}\s\s{\nset\sstate(state)\s"header"\n\s\s\s\s}\n}\n\s\s\s\s}
J foundin obsolete:\s8.6b1
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter cwjolly
J subsystem 29.\shttp\sPackage
J title http\s2.7.2\sfails\sto\scorrectly\sparse\sinput\s
J type Bug
K 2874782fffffffffffffffffffffffffffffffff
U cwjolly
Z 040c1a7dc47da269968a8770c29da890