Branch: Tag:

2004-05-06

2004-05-06 14:00:46 by Henrik Grubbström (Grubba) <grubba@grubba.org>

RequestID should now be without __INIT.

Rev: server/base_server/prototypes.pike:1.106

6:   #include <module.h>   #include <variables.h>   #include <module_constants.h> - constant cvs_version="$Id: prototypes.pike,v 1.105 2004/05/06 00:25:58 mast Exp $"; + constant cvs_version="$Id: prototypes.pike,v 1.106 2004/05/06 14:00:46 grubba Exp $";      #ifdef DAV_DEBUG   #define DAV_WERROR(X...) werror(X)
790:    string host;    //! The client's hostname, if resolved.    -  multiset(string) cache_status = (<>); +  multiset(string) cache_status;    //! Contains the caches that was hit when the request was served.    //! See the docstring for @tt{$cache-status@} in the @tt{LogFormat@}    //! global variable for known values, but note that the multiset
819:    }       // Parsed if-header for the request. -  static mapping(string:array(array(array(string)))) if_data = ([]); +  static mapping(string:array(array(array(string)))) if_data;       //! Parse an RFC 2518 9.4 "If Header".    //!
840:    //! The resource @expr{0@} (zero) represents the default resource.    mapping(string:array(array(array(string)))) get_if_data()    { -  if (!if_data || sizeof(if_data)) return if_data; +  if (if_data) return sizeof(if_data) && if_data;    -  if_data = 0; // Negative caching. +  if_data = ([]); // Negative caching.       string raw_header;    if (!(raw_header = request_headers->if) || !sizeof(data)) return 0;
1105:       // Charset handling    -  array(string) output_charset = ({}); +  array(string) output_charset;    string input_charset;       void set_output_charset( string|function to, int|void mode )
1113:    if (object/*(RXML.Context)*/ ctx = RXML_CONTEXT)    ctx->add_p_code_callback ("set_output_charset", to, mode);    -  if( search( output_charset, to ) != -1 ) // Already done. +  if( output_charset && search( output_charset, to ) != -1 ) // Already done.    return;    -  switch( mode ) +  switch( output_charset && mode )    {    case 0: // Really set.    output_charset = ({ to });
1203:    if (upper_case(force_charset) == "ISO-8859-1")    return ({ "ISO-8859-1", what });    } else { -  if (sizeof(output_charset) == 1 && +  if (output_charset && sizeof(output_charset) == 1 &&    upper_case(output_charset[0]) == "ISO-8859-1")    return ({ "ISO-8859-1", what });    }
1213:    string charset;    function encoder;    -  foreach( output_charset, string|function f ) +  foreach( output_charset || ({}), string|function f )    [charset,encoder] = join_charset(charset, f, encoder, allow_entities);    if (!encoder)    if (String.width(what) > 8) {
1309:    string charset="";    if( stringp(file->data) )    { -  if (sizeof (output_charset) || +  if ((output_charset && sizeof (output_charset)) ||    has_prefix (file->type, "text/") ||    (String.width(file->data) > 8))    {