public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
* RE: PATCH: Minor redirect fix for Gnatsweb 2.8.0
@ 2001-05-08  8:47 Dirk Bergstrom
  0 siblings, 0 replies; 2+ messages in thread
From: Dirk Bergstrom @ 2001-05-08  8:47 UTC (permalink / raw)
  To: 'Yngve Svendsen', gnats-devel

hmmm...  i fixed this in my local copy of gnatsweb 4, but i did it by
s/;/&/g in the code just before the redirect was sent.  i wasn't comfortable
globally setting -oldstyle_urls for such a localized problem.  however, i'm
not sure my fix is better -- anyone care to weigh in on the issue?

@@ -3355,12 +3336,6 @@
     #print $q->redirect(-location => $url,
     #                   -cookie => [$global_cookie, $db_cookie]);
     # So, this is sort of a lame replacement; a zero-delay refresh.
+
+    # the refresh header chokes on the query-string if the
+    # params are separated by semicolons...
+    $url =~ s/\;/&/g;
+    #
+
     print $q->header(-Refresh => "0; URL=$url",
                      -cookie => [$global_cookie, $db_cookie,
$expire_old_cookie
]),
           $q->start_html();

--
Dirk Bergstrom              dirk@juniper.net
____________________________________________
Juniper Networks Inc.,  Engineering Web Guru
Tel: 408.745.3182          Fax: 408.745.8905


> -----Original Message-----
> From: Yngve Svendsen [ mailto:yngve.svendsen@clustra.com ]
> Sent: Tuesday, May 08, 2001 6:17 AM
> To: gnats-devel@sources.redhat.com
> Subject: PATCH: Minor redirect fix for Gnatsweb 2.8.0
> 
> 
> The following patch fixes a problem caused by a change of 
> behaviour in all 
> versions of CGI.pm from 2.64 onwards (2.753 is current right 
> now). It now 
> by default returns URLs with parameters separated by 
> semicolons instead of 
> ampersands, subtly breaking the redirect functionality of 
> Gnatsweb versions 
> 2.7 beta and 2.8.0. Redirects still happen, but the browser 
> is redirected 
> to the main Gnatsweb page instead of to the page which the 
> user came from.
> 
> The following patch fixes this, by instructing CGI.pm to use 
> "old-style" URLs:
> 
> Index: gnatsweb.pl
> ===================================================================
> RCS file: /clustra/cvs/gnatsweb2/gnatsweb.pl,v
> retrieving revision 1.25
> diff -u -p -r1.25 gnatsweb.pl
> --- gnatsweb.pl 2001/05/04 13:44:12     1.25
> +++ gnatsweb.pl 2001/05/08 13:09:11
> @@ -97,9 +97,7 @@ else
>   use CGI::Carp qw/fatalsToBrowser/;
>   # 8/22/99 kenstir: CGI.pm-2.50's file upload is broken.
>   # 9/19/99 kenstir: CGI.pm-2.55's file upload is broken.
> -use CGI 2.56 qw/:standard/;
> -#use CGI 2.56 ();
> -#use CGI::Pretty qw/:standard/;
> +use CGI 2.56 qw(-oldstyle_urls :all);
>   use gnats qw/client_init client_exit client_cmd/;
> 
>   # Debugging fresh code.
> 
> 
> 
> 
> 
> Yngve Svendsen
> IS Engineer
> Clustra AS, Trondheim, Norway
> yngve.svendsen@clustra.com
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* PATCH: Minor redirect fix for Gnatsweb 2.8.0
@ 2001-05-08  6:15 Yngve Svendsen
  0 siblings, 0 replies; 2+ messages in thread
From: Yngve Svendsen @ 2001-05-08  6:15 UTC (permalink / raw)
  To: gnats-devel

The following patch fixes a problem caused by a change of behaviour in all 
versions of CGI.pm from 2.64 onwards (2.753 is current right now). It now 
by default returns URLs with parameters separated by semicolons instead of 
ampersands, subtly breaking the redirect functionality of Gnatsweb versions 
2.7 beta and 2.8.0. Redirects still happen, but the browser is redirected 
to the main Gnatsweb page instead of to the page which the user came from.

The following patch fixes this, by instructing CGI.pm to use "old-style" URLs:

Index: gnatsweb.pl
===================================================================
RCS file: /clustra/cvs/gnatsweb2/gnatsweb.pl,v
retrieving revision 1.25
diff -u -p -r1.25 gnatsweb.pl
--- gnatsweb.pl 2001/05/04 13:44:12     1.25
+++ gnatsweb.pl 2001/05/08 13:09:11
@@ -97,9 +97,7 @@ else
  use CGI::Carp qw/fatalsToBrowser/;
  # 8/22/99 kenstir: CGI.pm-2.50's file upload is broken.
  # 9/19/99 kenstir: CGI.pm-2.55's file upload is broken.
-use CGI 2.56 qw/:standard/;
-#use CGI 2.56 ();
-#use CGI::Pretty qw/:standard/;
+use CGI 2.56 qw(-oldstyle_urls :all);
  use gnats qw/client_init client_exit client_cmd/;

  # Debugging fresh code.





Yngve Svendsen
IS Engineer
Clustra AS, Trondheim, Norway
yngve.svendsen@clustra.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-05-08  8:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-08  8:47 PATCH: Minor redirect fix for Gnatsweb 2.8.0 Dirk Bergstrom
  -- strict thread matches above, loose matches on Subject: below --
2001-05-08  6:15 Yngve Svendsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).