Changeset 1405


Ignore:
Timestamp:
May 20, 2012, 4:31:34 PM (10 years ago)
Author:
kake
Message:

Fixed bug with POST redirection introduced in [1315].

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Changes

    r1396 r1405  
    33More detailed changelogs can be found at
    44<http://dev.openguides.org/log/trunk>.
     5
     60.68    ?
     7        Made sure that maps are centred and zoomed properly even when they only
     8          contain one point.
     9        Made preferences default to never expiring.
     10        Fixed POST bug introduced with whitespace redirection in version 0.66.
    511
    6120.67    07 May 2012
  • trunk/wiki.cgi

    r1357 r1405  
    3333    $q = CGI->new;
    3434
    35     # See if we need to redirect due to spaces in URL.
    36     my $redirect = OpenGuides::CGI->check_spaces_redirect(
     35    # See if we need to redirect due to spaces in URL.  Don't do this for
     36    # POST requests though - it leads to all the data being stuffed into the
     37    # URL, which breaks things if there's a lot of data.
     38    my $request_method = $q->request_method() || "";
     39    unless ( $request_method eq "POST" ) {
     40      my $redirect = OpenGuides::CGI->check_spaces_redirect(
    3741                                         cgi_obj => $q, wiki => $wiki );
    3842
    39     if ( $redirect ) {
    40         print $q->redirect( -uri => $redirect, -status => 303 );
    41         exit 0;
     43      if ( $redirect ) {
     44          print $q->redirect( -uri => $redirect, -status => 303 );
     45          exit 0;
     46      }
    4247    }
    4348
     
    4853    # If we did a post, then CGI->param probably hasn't fully de-escaped,
    4954    #  in the same way as a get would've done
    50     my $request_method = $q->request_method() || '';
    5155    if($request_method eq 'POST') {
    5256        $node = uri_unescape($node);
Note: See TracChangeset for help on using the changeset viewer.