Artifact
db91024c6924ae6bf2c6dcfa1df5a07e95764312:
Ticket change
[db91024c69]
- New ticket
[219235ffffffffff|219235ffff] <i>Get broken pipe error while making a https connection to a n</i>.
by
nobody on
2000-10-26 05:03:57.
D 2000-10-26T05:03:57
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s4653\sBug\nVersion:\s8.3\nSubmitDate:\s'2000-03-28'\nLastModified:\s'2000-04-04'\nSeverity:\sLOW\nStatus:\sAssigned\nSubmitter:\smroe\nChangedBy:\ssandeep\nOS:\sSolaris\nFixedDate:\s'2000-10-25'\nClosedDate:\s'2000-10-25'\n\n\nSample\sscript:\n\n#\shttpsConnect.tcl\s-\n#\n#\s\s\s\sShort\stcl\stest\sscript\sfor\stcl\sTLS\sand\sOpenSSL.\n#\s\s\s\sOpen\ssocket\sconnection\sto\ssecure\sweb\sserver.\n\npackage\srequire\shttp\npackage\srequire\stls\npackage\srequire\sbase64\n\nset\s::tls::debug\s1\n\nset\sheaders\s[list\sAuthorization\s"Basic\s[base64::encode\smroe:mroe]"]\nset\surl\shttps://elche:8016\n\nset\scvsPath\s\s\s[file\sjoin\s/\shome\smroe\scvs]\nset\scertFile\s\s[file\sjoin\s$cvsPath\sxmlserver\smodules\sx509\scerts\sclient.pem]\nset\skeyFile\s\s\s[file\sjoin\s$cvsPath\sxmlserver\smodules\sx509\scerts\sckey.pem]\nset\scaFile\s\s\s\s[file\sjoin\s$cvsPath\sxmlserver\smodules\sx509\scerts\scacert.pem]\nset\scaDir\s\s\s\s\s[file\sjoin\s$cvsPath\sxmlserver\smodules\sx509\scerts]\n\nhttp::register\shttps\s443\s[list\s::tls::socket\s\s-request\s\s1\s\s-require\s\s1\s\s-certfile\s$certFile\s\s-keyfile\s\s$keyFile\s\s\s-cafile\s\s\s$caFile\s\s\s\s]\n\nhttp::geturl\s$url\s\s-query\s\s\s"test"\s\s-headers\s$headers\s\s-timeout\s15000\n\nexit\s0\n\nRun\sthe\sabove\sscript\swhile\sthe\sserver\sis\snot\srunning.\n\nExpected\sresult:\n\s\s\s\sSame\sas\swhen\srunning\sthis\scommand\swithout\srunning\shttp::register\sfirst,\n\s\s\s\shttp::status\s=\sioerror.\n\nActual\sresult:\n\s\s\s\serror\sflushing\s"sock4":\sbroken\spipe\n\s\s\s\swhile\sexecuting\n"flush\s$s"\n\s\s\s\s("eval"\sbody\sline\s35)\n\s\s\s\s(procedure\s"wait"\sline\s35)\n\s\s\s\sinvoked\sfrom\swithin\n"wait\s$token"\n\s\s\s\s(procedure\s"http::geturl"\sline\s219)\n\s\s\s\sinvoked\sfrom\swithin\n"http::geturl\s$url\s\s-query\s\s\s"test"\s\s-headers\s$headers\s\s-timeout\s15000"\n\s\s\s\s(file\s"httpsConnect.tcl"\sline\s53)\n\n\n\nThe\sproblem\sis\sthat\swe\sopen\sa\ssocket\sto\sthe\sremote\sserver\susing\stls::socket,\sbut\sthe\snormal\sway\swe\scheck\swhether\sa\ssocket\sis\s"good"\sdoesn't\swork\son\stls\ssockets.\s\s(The\snormal\sway\sis\sto\scheck\seof\son\sthe\ssocket\sand\sdo\sfconfigure\s$sock\s-error.}\s\sOne\sway\sto\sfigure\sout\sif\sthe\ssocket\sis\sinvalid\searly\son\sis\sto\scall\stls::handshake\son\sthe\stls\ssocket.\s\sBut\sthe\shttp\spackage\scurrently\shas\sno\sway\sto\sknow\sthis\swhen\schecking\sthe\sconnection\sin\shttp::Connect.\s\sI\sbelieve\sthe\sright\sthing\sto\sdo\sis\sto\sregister\stwo\stls\smethods\sfor\sdoing\shttps:\stls::socket\sfor\sestablishing\sthe\sconnection\sand\stls::handshake\sfor\schecking\sif\sthe\sconnection\sis\sgood.\s\sThen\shttp::Connect\scan\scall\stls::handshake\sto\scheck\sif\sthe\ssocket\sis\sgood\sfor\stls\ssockets\swhile\sdoing\swhat\sit\susually\sdoes\sfor\snormal\ssockets.\n\n\nI\sbelieve\sthis\sapproach\swould\salso\ssolve\ssome\sother\sannoying\sproblems\sthat\spop\sup\sdue\sto\slack\sof\scommunication\sbetween\sthe\shttp\spackage\sand\stls.\n\n\nFor\snow,\sthe\swork-around\sis\sto\scatch\sthe\sgeturl\sand\smassage\sthe\serror\smessage.\s\n\n--\s04/04/2000\ssandeep\n\n
J foundin obsolete:\s8.3
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 62.\s(unused)
J title Get\sbroken\spipe\serror\swhile\smaking\sa\shttps\sconnection\sto\sa\sn
J type Bug
K 219235ffffffffffffffffffffffffffffffffff
U nobody
Z 1cbeea1fd80951b7769121c709f75891