Ticket URLs don't work when logged out

I’m having some trouble with the ticket URLs contained in the mail
sent to queue watchers. They look like this:

http://hostname/Ticket/Display.html?id=42

They work fine when my browser is running and I’m already logged into RT.
When I’m not logged in, RT displays the log-in screen (obviously),
but after logging in, RT says “No ticket specified”.

I guess this is because the log-in form is sent as a POST request, like this:

POST /Ticket/Display.html?id=42 HTTP/1.1
[some header lines removed]
User-Agent: iCab/2.7.1 (Macintosh; I; PPC)
Content-Type: application/x-www-form-urlencoded
Content-Length: [removed to protect the password]

user=sflothow&pass=

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.

I’ve verified this with iCab/2.7.1 on MacOS 8.6 and IE/6 on Win2K; RT
is 2.0.13 (FCGI) on Apache 1.3.
Can someone reproduce this problem on their system?

Sebastian Flothow
sebastian@flothow.de
#include <stddisclaimer.h>

This works fine for me. The only difference I see is that I’m
using mod-perl, not FCGI.

ttfn,
kevin

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

At 8:33 Uhr -0400 7.5.2002, darren chamberlain wrote:

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:

[…]

Many thanks, that solves the problem.

I have a feeling the documentation people (whoever they are) should
just copy a lot from this list - do they?

Sebastian Flothow
sebastian@flothow.de
#include <stddisclaimer.h>