Branch: Tag:

2001-07-21

2001-07-21 10:55:50 by Martin Stjernholm <mast@lysator.liu.se>

Fixed the silly bug in http_redirect. Use Configuration.get_url in
get_server_url.

Rev: server/etc/modules/Roxen.pmod:1.106

1:   // This is a roxen pike module. Copyright © 1999 - 2000, Roxen IS.   // - // $Id: Roxen.pmod,v 1.105 2001/07/21 09:28:40 mast Exp $ + // $Id: Roxen.pmod,v 1.106 2001/07/21 10:55:50 mast Exp $      #include <roxen.h>   #include <config.h>
351:    // Add protocol and host to local absolute URLs.    if(url[0]=='/') {    if(id) { -  url = id->url_base(); +  url = id->url_base() + url[1..];    if (!prestates) prestates = id->prestate;    }    else {
3151:   }      string get_server_url(Configuration c) - //! Returns an URL that the given configuration answers on. + //! Returns a URL that the given configuration answers on.   //!   //! @note   //! If there is a @[RequestID] object available, you probably want to
3159:   //! takes into account information sent by the client and the port the   //! request came from. (It's often faster too.)   { -  string url=c->query("MyWorldLocation"); -  if(stringp(url) && sizeof(url)) return url; -  array(string) urls=c->query("URLs"); -  return get_world(urls); +  return c->get_url();   }      string get_world(array(string) urls) {