Changeset 43 in bookmarks for trunk


Ignore:
Timestamp:
05/31/13 12:40:09 (11 years ago)
Author:
peter
Message:
  • don't append an extra '/' to the end of the base_uri
  • save the created/edited bookmark object, and use its bookmark_uri as the redirection location after a POST
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BookmarkApp.pm

    r41 r43  
    2727    $base_uri->host($ENV{SERVER_NAME}); 
    2828    $base_uri->port($ENV{SERVER_PORT}); 
    29     $base_uri->path($ENV{SCRIPT_NAME} . '/'); 
     29    $base_uri->path($ENV{SCRIPT_NAME}); 
    3030 
    3131    my $bookmarks = Bookmarks->new({ 
     
    370370    my $title = $q->param('title'); 
    371371    my @tags = split ' ', $q->param('tags'); 
    372     $self->_bookmarks->add({ 
     372    my $bookmark = $self->_bookmarks->add({ 
    373373        uri   => $uri, 
    374374        title => $title, 
     
    387387    $self->header_type('redirect'); 
    388388    $self->header_props( 
    389         -uri => $ENV{REQUEST_URI}, 
     389        -uri => $bookmark->bookmark_uri->canonical, 
    390390        -status => 303, 
    391391    ); 
Note: See TracChangeset for help on using the changeset viewer.