[Http-webtest-general] Redirects and Headers (cookies / POST)
Brought to you by:
m_ilya,
richardanderson
From: William M. <wi...@kn...> - 2003-07-03 19:23:05
|
Well, it turns out that redirection requests that preserve header info (e.g., POSTs, cookies, etc.) are a bit of a mess[1]. There does not seem to be any clear consensus on whether or not clients should[2] or should not[3] support preserving the headers on a redirect. Apparently LWP has sided on the latter option and does not resend headers on a redirect. The newsgroups have several examples of debug output that seem to point to this same conclusion so I'll spare ya'll the gory details. What results when a page that sets a cookie redirects to another page without sending the cookie (e.g., a login page), duplicate cookies are created. One suggestion is to use an intermediary page with a meta refresh tag[2]. Since I'm using Perl to develop my web application, I was able to avoid the need to generate this extra page and instead was able to call the necessary subroutine that displayed the desired page upon a successful login. Thanks again for your prompt assistance in helping me debug my situation. HTTP::WebTest is fantastic. William [1] http://ppewww.ph.gla.ac.uk/~flavell/www/post-redirect.html [2] http://archives.real-time.com/rte-tomcat/2000/May/msg01599.html [3] http://www.west-wind.com/wckb/redirectsandcookiesandsessions.htm -- Knowmad Services Inc. http://www.knowmad.com |