Report Bug

Search BUGZ


Recently Closed

Browse Bugs


Inside AddedValues

Join Now

Bug Report 000017

Reported : 06:00; 15May2002 (changed 23:34; 15Oct2005)
Reported By : Samuel Reynolds
Status : Unknown ( Update)
Software Item : Mainresponder
Abstract : webserver.util.setCookie doesn't append cookies correctly
What I did : In Control Panel, clicked on Filer Add-In. Then clicked on (linked) item label to view help text (from Wizard).
What I Expected : Popup window opens, displaying help text for the item clicked.
What Happened : Popup window opened, but help was displayed from Hosting wizard instead of from Filer add-in wizard.
Impact : Showstopper
Supporting Notes : I haven't been able to get the item help working correctly in Control Panel add-ins. I traced throught the code and found out why. &lt;tt>MainResponder.controlPanel.addIn&lt;/tt> calls &lt;tt>webserver.util.setCookie&lt;/tt> <br>to store the add-in name in a cookie named "wizard". <br> <br>When someone clicks on the linked item label, a relative URL of <br>the form &lt;tt>popupWindow$1, 2&lt;/tt> is opened in a separate, popup window. <br>This resolves to the script at &lt;tt>mainResponder.controlPanel.popupWindow.&lt;/tt> <br>&lt;tt>MainResponder.controlPanel.popupWindow&lt;/tt> looks for <br>&lt;tt>pta^.requestHeaders.cookies.wizard&lt;/tt>, and uses its value to look up the add-in wizard and retrieve the help text to display. <br>If &lt;tt>pta^.requestHeaders.cookies.wizard&lt;/tt> isn't found, it defaults <br>to whatever the first panel from the Control Panel wizard <br>(the Hosting wizard), and returns the text from there--or <br>errors out if there are more items in the desired panel than <br>there are in this (unintentional?) default panel. <br> <br>I tracked down the problem to &lt;tt>webserver.util.setCookie.&lt;/tt> <br>When it is called more than once, &lt;tt>webserver.util.setCookie&lt;/tt> <br>appends &lt;tt>"rn"&lt;/tt> and the new named cookie onto the existing <br>contents of &lt;tt>responseHeaders.["Set-Cookie"].&lt;/tt> This results <br>in an un-tagged line in the header, which is (properly) <br>ignored by the browser. <br> <br>To fix this, make the following change in &lt;tt>webserver.util.setCookie&lt;/tt>: Change the line:<pre> <br> adrcookie^ = adrcookie^ + "rn" + s <br></pre>needs to be changed to:<pre> <br> adrcookie^ = adrcookie^ + "rnSet-Cookie: " + s <br></pre> <br>
Supporting Files :
Developer :

Last update: Saturday, October 15, 2005 at 11:34:34 PM. Send spam to gotcha@baylys.com