Branch: Tag:

2008-05-09

2008-05-09 18:22:47 by Martin Stjernholm <mast@lysator.liu.se>

Fixed url encoding bug in redirects.

Rev: server/etc/modules/Variable.pmod/module.pmod:1.107

1: - // $Id: module.pmod,v 1.106 2008/01/29 10:53:51 mathias Exp $ + // $Id: module.pmod,v 1.107 2008/05/09 18:22:47 mast Exp $      #include <module.h>   #include <roxen.h>
1649:    (section ? ("section=" + section + "&") : "") +    "random=" + random(4949494);    -  nid->misc->moreheads = -  ([ -  "Location":nid->not_query+(nid->misc->path_info||"")+ -  "?"+query+"#"+path(), -  ]); +  string url = +  Roxen.http_encode_invalids (nid->not_query + +  (nid->misc->path_info || "") + +  "?" + query + "#" + path()); +  +  nid->set_response_header ("Location", url);    if( nid->misc->defines )    nid->misc->defines[ " _error" ] = 302;    else if( id->misc->defines )