Skip to content
Tcl Source Code Artifact [3dbab6185e]
Login

Artifact [3dbab6185e]

Artifact 3dbab6185e80c384d2db56bbb896e98d6f2d7008:

Ticket change [3dbab6185e] - New ticket [1510702fffffffff|1510702fff] <i>8.4.13 on win2k: eof problem on socket channels </i>. by nobody on 2006-06-22 14:36:38.
D 2006-06-22T14:36:38
J assignee andreas_kupries
J cmimetype text/plain
J comment I\smet\swith\sthe\sproblem\swhen\sit\stook\scca.\s20\ssecs\sfor\n::http::geturl\sto\sreturn\sform\san\surl\sfetch\sthat\swas\ninstantenous\sin\sMozilla\sFirefox.\n\nI\sthen\stried\smy\sold\scode\sI\shad\swritten\sfor\sthe\ssame\npurpose:\n\n##################################################################\nproc\srdhdrs\s{chan}\s{\n\s\s\sglobal\sheaders\n#Separate\sthe\sheaders\sfrom\sthe\sbody\n\s\s\sif\s{[set\sn\s[gets\s$chan\ss]]\s!=\s0}\s{\n\s\s\s\s\s\sif\s{$n\s<\s0}\s{return}\n\s\s\s\s\s\s\s\s\s\sappend\sheaders\s$s\\n\n\s\s\s}\selse\s{\n\s\s\s\s\s\sfconfigure\s$chan\s-translation\sbinary\s-encoding\sbinary\n\s\s\s\s\s\sfileevent\s$chan\sreadable\s[list\srdcont\s$chan]\n\s\s\s}\n}\n\nproc\srdcont\s{chan}\s{\n\s\s\sglobal\sFL\sbody\n\s\s\sset\sfrag\s[read\s$chan]\n\s\s\sif\s{![eof\s$chan]}\s{\n\s\s\s\s\s\sappend\sbody\s$frag\n\s\s\s}\selse\s{\s\s\s\n\s\s\s\s\s\sfileevent\s$chan\sreadable\s{}\n\s\s\s\s\s\sset\sFL\s1\n\s\s\s}\n}\n\nproc\sgeturl\s{host\sresrc\scki}\s{\n\s\s\sglobal\sFL\sbody\srqhdrs\sheaders\s\n\s\s\sset\sheaders\s""\n\n\s\s\sset\sch\s[socket\s$host\s80]\n\s\s\sfconfigure\s$ch\s-translation\s{auto\scrlf}\s-blocking\s0\n-buffersize\s8192\s\n#\s\s\sfconfigure\s$ch\s-translation\s{auto\scrlf}\s-blocking\s0\n-buffering\sline\s-buffersize\s8192\s\n\s\s\sfileevent\s$ch\sreadable\s[list\srdhdrs\s$ch]\n\s\s\s\n\s\s\sputs\s$ch\s"GET\s$resrc\sHTTP/1.1"\n\s\s\sputs\s$ch\s"Host:\s$host"\n\s\s\sputs\s$ch\s$rqhdrs\n\s\s\sif\s{$cki\sne\s""}\s{puts\s$ch\s$cki}\n\s\s\sputs\s$ch\s""\n\s\n\s\s\sflush\s$ch\n\s\s\n\s\s\svwait\sFL\n\s\s\sclose\s$ch\n}\n##################################################################\n\nAs\sit\sturns\sout\sthe\sread\scommand\sthat\sshould\sdetect\sthe\neof\scondition\safter\sthe\smessage\sbody\shas\sbeen\sread\sin\ndoes\snot\sreturns\simmediaely\sbut\sonly\safter\sthe\sabove\nlong\sdelay\sthat\sseems\sto\sbe\sa\stime-out.\sThe\sresult\sis\nthe\ssame\sif\s"-blocking\s1"\sis\sset\son\sthe\schannel.\n\nI\salso\snoticed\sanother\snewly\soccuring\sproblem.\sThe\noriginal\sversion\sworked\swith\s"-buffering\sline"\sand\nwithout\sthe\sflush\scommand.\sHttp\ssniffing\srevealed\sthat\nin\sthis\scase\snow\sonly\sthe\sfirst\sline\swas\ssent.\n\nI\shave\srecently\schanged\sto\s8.4.13\sfrom\seither\s8.4.9\sor\n8.4.11\s(I\scan\sremember\swhich)\sand\suntil\snow\sI\shave\snot\nfaced\sthis\sproblem\salthough\sI\suse\sWEB\sscraping\squite\nfrequently\sfor\scomplex\ssearch\ssequences.\n\nJoe\sNemeth\[email protected]\n
J foundin obsolete:\s8.4.13
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 24.\sChannel\sCommands
J title 8.4.13\son\swin2k:\seof\sproblem\son\ssocket\schannels\s
J type Bug
K 1510702fffffffffffffffffffffffffffffffff
U nobody
Z 41830642772119e293d331bfc2310fb0