Branch: Tag:

2002-09-03

2002-09-03 15:51:25 by Martin Stjernholm <mast@lysator.liu.se>

Moved some support stuff (output_charset, input_charset, set_output_charset,
adjust_for_config_path) from protocols/http.pike to the RequestID class, so
that we'll get them in InternalRequestID too. Also fixed som trivial bugs in
http.pike.

Rev: server/base_server/prototypes.pike:1.52
Rev: server/protocols/http.pike:1.374

5:   #include <config.h>   #include <module.h>   #include <module_constants.h> - constant cvs_version="$Id: prototypes.pike,v 1.51 2002/06/17 09:36:33 anders Exp $"; + constant cvs_version="$Id: prototypes.pike,v 1.52 2002/09/03 15:51:24 mast Exp $";      class Variable   {
584:    //! The raw request body, containing non-decoded post variables et cetera.       string leftovers; -  string rawauth; -  string realauth; +  string rawauth, realauth; // Used by many modules, so let's keep this.    string since;       string remoteaddr;
715:    }    }    +  array(string) output_charset = ({}); +  string input_charset; +  +  void set_output_charset( string|function to, int|void mode ) +  { +  if( search( output_charset, to ) != -1 ) // Already done. +  return; +  +  switch( mode ) +  { +  case 0: // Really set. +  output_charset = ({ to }); +  break; +  +  case 1: // Only set if not already set. +  if( !sizeof( output_charset ) ) +  output_charset = ({ to }); +  break; +  +  case 2: // Join. +  output_charset |= ({ to }); +  break; +  } +  } +     string scan_for_query( string f )    {    if(sscanf(f,"%s?%s", f, query) == 2)
737:    return f;    }    +  void adjust_for_config_path( string p ) +  { +  if( not_query ) not_query = not_query[ strlen(p).. ]; +  raw_url = raw_url[ strlen(p).. ]; +  misc->site_prefix_path = p; +  } +     void end(string|void s, int|void keepit){}    void ready_to_receive(){}    void send_result(mapping|void result){}