<i>Read headerless (very specific/broken) servers data</i> status still Open with 7 other changes
by
.
D 2022-05-30T22:18:03.901
J assignee aku
J closer nobody
J comment Currently\swhen\susing\shttp::geturl\swith\sa\sserver\sthat\s\r\ndoes\snot\ssend\srequired\sheaders\s(but\sstarts\ssending\s\r\ndata\sright\saway)\shttp::Event\sstays\sin\sstate=header\sand\s\r\nafter\scommand\sreturns\sthere\sis\seffectively\snothing\s\r\nreceived\s(unless\sby\saccident\ssome\sline\shappens\sto\slook\s\r\nlike\sHTTP-header).\r\n\r\nThis\sbehaviour\srises\sfrom\smissing\selse\sclause\sin\s\r\nhttp::Event\s(last\sstatement\sis\selseif).\r\n\r\nSuggested\sbehaviour\sis\sthat\sif\sin\sstate=header\sthere\s\r\nis\sa\snonempty\sline\sthat\sdoes\snot\smatch\sany\sof\s\r\nexpressions\sso\sfar\sthat\sline\sis\sconsidered\sto\sbe\sfirst\s\r\nline\sof\sdata\sand\streated\sas\ssuch.\r\n\r\nThis\simplementation\scan't\shandle\srequests\sthat\suse\s-\r\nhandler\soption,\sas\ssocket\sbuffer\scan't\sbe\sunread\s(at\s\r\nleast\snot\sat\sscript\slevel).\sAlso\sencodings\shave\sslight\s\r\nchance\sof\smisbehaviour,\sas\sline\sis\sread\sbefore\ssocket\s\r\nhas\sbeen\sfconfigured.\sThat\sshould\sbe\spossible\sto\sfix\s\r\n(except\s-binary\sconfiguration,\swhere\scarriage\sreturn\s\r\ncan\sbe\slost\sdue\stranslation=auto).\sProgress\scallbacks\s\r\nare\slikely\sto\sbe\sproblematic,\stoo,\sespecially\swith\s\r\ncallbacks\srelying\son\sfixed\schunk\ssizes.\r\n\r\nBut\smost\sof\sthese\sproblems\s(excluding\s-handler)\sare\sto\s\r\nbe\sexpected\sas\scurrently\syou\swouldn't\sget\sanything\sat\s\r\nall\sto\sprocess.
J icomment A\sserver\sresponse\swith\sno\sstatus\sline\sor\sheaders,\sbut\sonly\sa\sresponse\sbody,\sis\sthe\s"Simple-Response"\sof\sHTTP/0.9\sand\s1.0.\s\sThe\srelevant\stext\sof\sRFC\s1945\sSection\s6\sis:\r\n\r\n\s\s\sIf\sa\sclient\ssends\san\sHTTP/1.0\sFull-Request\sand\r\n\s\s\sreceives\sa\sresponse\sthat\sdoes\snot\sbegin\swith\sa\sStatus-Line,\sit\sshould\r\n\s\s\sassume\sthat\sthe\sresponse\sis\sa\sSimple-Response\sand\sparse\sit\r\n\s\s\saccordingly.\sNote\sthat\sthe\sSimple-Response\sconsists\sonly\sof\sthe\r\n\s\s\sentity\sbody\sand\sis\sterminated\sby\sthe\sserver\sclosing\sthe\sconnection.\r\n\r\nAppendix\sA\sof\sRFC\s7230\sstates:\r\n\r\n\s\s\sHTTP/1.1\shas\sbeen\sdesigned\sto\smake\ssupporting\sprevious\sversions\seasy.\r\n\s\s\sA\sgeneral-purpose\sHTTP/1.1\sserver\sought\sto\sbe\sable\sto\sunderstand\sany\r\n\s\s\svalid\srequest\sin\sthe\sformat\sof\sHTTP/1.0,\sresponding\sappropriately\r\n\s\s\swith\san\sHTTP/1.1\smessage\sthat\sonly\suses\sfeatures\sunderstood\s(or\r\n\s\s\ssafely\signored)\sby\sHTTP/1.0\sclients.\s\sLikewise,\san\sHTTP/1.1\sclient\r\n\s\s\scan\sbe\sexpected\sto\sunderstand\sany\svalid\sHTTP/1.0\sresponse.\r\n\r\nThis\ssuggests\sthat\sour\sHTTP/1.1\sclient\sshould\sbe\sable\sto\sunderstand\sa\svalid\sHTTP/1.0\s"Simple-Response",\seven\sthough\sthe\s"Simple-Response"\sis\snot\svalid\sas\sa\sHTTP/1.1\sresponse.\s\sThe\stypical\sorigin\sof\sa\s"Simple-Response"\sis\san\sancient\sHTTP/1.0\sserver.
J login kjnash
J mimetype text/plain
J severity Minor
K 1589887fffffffffffffffffffffffffffffffff
U kjnash
Z 1f188629c8ebdbce8ea02ca8b099367f