Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
These issues seem to be related to the cache

How did you to come to this conclusion?

Upon casual examination of your code fragment, I notice you're mixing CGI::redirect with CGI::Sessions::header, well that is never going to work, because HTTP header only get sent once.

You can't have a session without a sid.

You can only pass a sid through, cookie, url param, or form param.

Your use of CGI::Session::header suggests you want to use the cookie way, but you don't send any cookies when you use CGI::redirect

$ perl -MCGI -MCGI::Session -MDDS -le " Dump( CGI::Session->new->heade +r ); " $VAR1 = "Set-Cookie: CGISESSID=7259a9a49c42fea87376be33478731b8; path= +/\r\nDate: Mo". "n, 23 May 2011 17:40:06 GMT\r\nContent-Type: text/html; chars +et=ISO-8859-1". "\r\n\r\n"; $ perl -MCGI::Session -MDDS -le " Dump( CGI->redirect )" $VAR1 = "Status: 302 Found\r\nLocation: http://localhost\r\n\r\n";
See CGI::Session::Tutorial, Ovid's CGI Course

Here is monkey patch

use CGI::Session; sub CGI::Session::redirect { my $self = shift; return $self->query->redirect(-cookie => $self->cookie, @_ ); } use DDS; Dump( CGI::Session->new->redirect ); __END__ $VAR1 = "Status: 302 Found\r\nSet-Cookie: CGISESSID=a19147247f0207a6c3 +14b5aadc7c232". "a; path=/\r\nDate: Mon, 23 May 2011 17:46:15 GMT\r\nLocation: + http://localho". "st\r\n\r\n";

In reply to Re: CGI::Session "cache" issue by Anonymous Monk
in thread CGI::Session "cache" issue by Zhris

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (11)
    As of 2015-07-02 04:24 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









      Results (27 votes), past polls