Hmm. That sounds like it should work, although our http expert is away
on vacation this week, and he'd know for sure. What you try an
http-request instead of an http-post? If this works, and your post
doesn't, that'll be interesting data. I know that we successfully set a
cookie in a header as shown below, although our code is going a GET,
not a POST.
let $headers := dictionary ( ("Cookie", "sid=ABC1" ) )
let $infoDict := dictionary ( ("Method", "POST"), ("Headers",
$headers), ("PostData", $myData) )
let $response := http-request($myURL, $infoDict)
Let me know what you find....
On Thursday, April 17, 2003, at 9:28 AM, Sherlock Developer Trufsoft
I have a problem while using http-post in XQuery.
I am using the following code :
let $response := http-post( $myUrl, $myData, $myCookieHeader)
and at the same time I am running tcpflow in a Terminal to see what's
going on. I am surprise to see that the dictionary header
$myCookieHeader does not show up at all in the HTTP Post. I have
initialized the dictionary as follow :
let $myCookieHeader := dictionary( ("Cookie", "sid=ABC1" ) )
but in the tcpflow session I can see a different Cookie header sent to
the server... The cookie header sent is the one I received originally
from a previous http post, but I don't want to send it back... Instead
I want to send my own one !
This is the output of my tcpflow session for the previous HTTP post.
010.000.001.002.53050-010.000.001.009.00080: POST /cgi-bin/TestPost
Cookie: sid=279050; stime=600
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC)
[some data here]
As you can see Sherlock is not sending the cookie "sid" I defined but
instead a previous one received.
So is there a way for me to either flush the cookie cache or force mine
to be used instead of the one being received previously ? This is
critical otherwise I can end up in a completely different session,
which is not what the user is expecting !