roxen.lists.pike.general

Subject Author Date
Re: Pike documentation Dave Walton <dw-pike[at]digger[dot]net> 10-12-2008
Bill Welliver wrote:
> 
> No cookies? How do you manage to get by? :) 

My doctor told me to cut back on sweets.  :)
Actually, if there's a site I care about that won't work without
cookies, I'll turn them on for that site.  Which I would have done for
the wiki, except that the cookie requirement there is a bug, not a
feature.  So I figured it'd be better to report the problem than just
work around it.

> I haven't had a chance to
> fiddle with the wiki problem, but I suspect it's web server and not wiki
> related. Maybe some day soon I'll have a chance to look into it.

Thanks to the Caudium CVSWeb, I would agree with your assessment.  And
narrow it down to this, in caudium/server/modules/misc/123session.pike:

mixed sessionid_set_prestate(object id, string SessionID) {
  string url=Caudium.strip_prestate(Caudium.strip_config(id->raw_url));
  string new_prestate = "SessionID="+SessionID;
  id->prestate += (<new_prestate>);
  return Caudium.HTTP.redirect(url, id);
}

id->raw_url appears to be the request from the browser, still encoded.
Caudium.strip_config() does not urldecode its return value.  Neither
does Caudium.strip_prestate().  Then Caudium.HTTP.redirect() calls
Caudium.http_encode_string() to encode the (already-encoded) URL.  So
somewhere in there, it ought to do:

  url = Caudium.http_decode_url(url);

[Or, perhaps, Caudium.http_decode(), depending on what URLs containing
"+" look like at that point.]

But, hey, I don't even use Caudium...  I could be wrong.  :)

Dave