Roxen.git
/
server
/
etc
/
modules
/
Roxen.pmod
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/etc/modules/Roxen.pmod:1:
// This is a roxen pike module. Copyright © 1999 - 2001, Roxen IS. //
-
// $Id: Roxen.pmod,v 1.
127
2001/10/
05
15
:
08
:
02
per Exp $
+
// $Id: Roxen.pmod,v 1.
128
2001/10/
08
06
:
07
:
41
per Exp $
#include <roxen.h> #include <config.h> #include <version.h> #include <module.h> #include <variables.h> #include <stat.h> #define roxen roxenp() #ifdef HTTP_DEBUG
Roxen.git/server/etc/modules/Roxen.pmod:548:
// Ok, no domain present in the URL and no ID object given. // Perhaps one should dare throw an error here, but since most // UA can handle the redirect it is nicer no to. } } if(prestates && sizeof(prestates)) url = add_pre_state (url, prestates); HTTP_WERR("Redirect -> "+http_encode_string(url));
+
+
if( String.width( url )>8 && !has_value( url, "?" ) )
+
url += "?magic_roxen_automatic_charset_variable=åäö";
+
return http_low_answer( 302, "Redirect to "+html_encode_string(url)) + ([ "extra_heads":([ "Location":http_encode_string( url ) ]) ]); } mapping http_stream(Stdio.File from) //! Returns a result mapping where the data returned to the client //! will be streamed raw from the given Stdio.File object, instead of //! being packaged by roxen. In other words, it's entirely up to you //! to make sure what you send is HTTP data. {