[rt-users] Ticket URLs don't work when logged out

darren chamberlain darren at boston.com
Tue May 7 08:33:26 EDT 2002


* Sebastian Flothow <sebastian at flothow.de> [2002-05-06 15:58]:
> I'm having some trouble with the ticket URLs contained in the mail
> sent to queue watchers. They look like this:

[-- snip --]

> So RT (or Mason, or whatever) ignores the "?id=42" part of the URL 
> because it's a POST request, and the POST data doesn't contain the 
> ticket ID.

By default, CGI.pm doesn't use both GET and POST parameters, and
RT's HTML::Mason setup uses CGI to parse parameters.  You can modify
CGI.pm to prevent this:


    442       if ($meth eq 'POST') {
    443           $self->read_from_client(\*STDIN,\$query_string,$content_length,0)
    444               if $content_length > 0;
    445           # Some people want to have their cake and eat it too!
    446           # Uncomment this line to have the contents of the query string
    447           # APPENDED to the POST data.
    448           # $query_string .= (length($query_string) ? '&' : '') . $ENV{'QUERY_STRING'} if defined $ENV{'QUERY_STRING'};
    449           last METHOD;
    450       }

(CGI.pm, version 2.752, which ships with Perl 5.6.1; you may need to
adjust the line numbers a bit, depending on the age of your Perl.)

The newest version of CGI.pm (2.81) also has this same commented-out
piece of code (line 458).

(darren)

-- 
How can I believe in God when just last week I got my tongue
caught in the roller of an electric typewriter?
    -- Woody Allen




More information about the rt-users mailing list