Tcl Source Code

Artifact [8179f124fb]
Login

Artifact 8179f124fb728b3dbbc67c7dfbf8af876730787e:

Ticket change [8179f124fb] - New ticket [c11a51c482] Configuration race condition in accept types. by dkf 2014-07-06 17:13:33.
D 2014-07-06T17:13:33.182
J assignee nobody
J closer nobody
J cmimetype text/html
J comment If\syou're\susing\sthe\shttp\spackage\sto\sdo\sREST\swith\scontent\stype\snegotiation,\syou\sneed\sto\sconfigure\sthe\spackage's\s<tt>Accept:</tt>\stypes\smechanism\sfrom\stime\sto\stime.\sThis\sis\sa\sbit\sof\sa\sbroken\sAPI,\sin\sthat\sthere's\sno\soption\sto\soverride\sfrom\soptions\spassed\sto\s<tt>http::geturl</tt>.\sThis\sis\snot\sthe\sfeature\schange\sI'm\srequesting.\r\n<p>\r\n<i>However,</i>\sif\syou're\salso\susing\sasynchronous\sconnecting\sthen\syou've\sgot\san\sadditional\sproblem\sin\sthat\sthe\sconfiguration\sof\sthe\s<tt>-accept</tt>\soption\sis\sonly\sread\swhen\sthe\sconnection\sis\smade;\stwo\sconnections\sthat\srequire\sdifferent\s<tt>Accept:</tt>\sheaders\swill\shave\sa\srace\scondition\sbetween\sthe\stwo,\sand\sso\swhich\sis\sused\swill\sbe\spretty\smuch\srandom.\s<b>This\sIs\sWrong.</b>\sThis\sis\sthe\sbug\sI'm\sreporting.\r\n<p>\r\nSuggested\sfix,\s<i>without\sfixing\sthe\soriginal\sAPI\sbotch,</i>\sis\sto\stake\sa\scopy\sof\s<tt>$http(-accept)</tt>\sinto\sthe\s<tt>state</tt>\sarray\sduring\s<tt>http::geturl</tt>\sso\sthat\sthe\svalue\sused\sin\s<tt>http::Connected</tt>\sis\spredictable.\r\n<p>\r\nSee\salso:\s<a\shref="http://www.kroc.tk/forum/index.php?t=msg&th=1041&goto=5213&#msg_5213">this\sthread</a>\swith\sthe\scomment\sthat\sprompted\sme\sto\slook\sinto\sthe\spotential\sfeature\srequest,\sand\sdiscover\sthe\srace:\r\n<blockquote><tt><i>Ok\swell\sthe\sfinal\ssolution\swas\sthat\susing\s-headers\sin\sthe\shttp::geturl\sdoesn't\sseem\sto\swork\swhen\ssetting\san\s"Accept"\sheader\s-\swhich\skind\sof\ssucks…</i></tt></blockquote>
J foundin http\s2.8.8
J is_private 0
J login dkf
J priority 5\sMedium
J resolution None
J severity Minor
J status Open
J submitter dkf
J subsystem 29.\shttp\sPackage
J title Configuration\srace\scondition\sin\saccept\stypes
J type Bug
K c11a51c482ba5720793d44340f76934c59718780
U dkf
Z dd624d76a1769891ac15506d5c09e0ba