Roxen.git / server / protocols / http.pike

version» Context lines:

Roxen.git/server/protocols/http.pike:327: Inside #if defined(OLD_RXML_CONFIG)
   if(sscanf(replace(raw_url,({"%3c","%3e","%3C","%3E" }),    ({"<",">","<",">"})),"/<%*s>/%s",url)!=2)    url = "/";    else    url = "/"+url;       multiset do_mod_config( multiset config )    {    if(!mod_config) return config;    foreach(mod_config, string m) -  if(m[0]=='-') +  if(sizeof(m) && m[0]=='-')    config[m[1..]]=0;    else    config[m]=1;    return config;    };       void do_send_reply( string what, string url ) {    // FIXME: Delayed chaining! my_fd_busy.    CHECK_FD_SAFE_USE;    url = url_base() + url[1..];
Roxen.git/server/protocols/http.pike:584:    if (mixed err = catch {    f = Roxen.get_decoder_for_client_charset (input_charset) (f);    })    report_debug ("Client %O requested path %O which failed to decode "    "with the input charset %O: %s",    client_var->fullname, f, input_charset,    describe_error (err));    }    else    catch (f = utf8_to_string (f)); +  if (String.width(f) > 8) { +  // Wide, so it might contain combiners. +  // Combine them if they are there. +  f = Unicode.normalize(f, "NFC");    } -  +  }       // Now after charset decode we can add the multipart/form-data    // variables in case they were rfc 2388 correct.    if (mapping(string:array(string)) ppv =    m_delete (misc, "proper_post_vars")) {    misc->post_variables = ppv;    foreach (ppv; string var; array(string) val) {    if (array(string) oldval = real_variables[var])    // Ensure POST variables come first, for consistency.    real_variables[var] = val + oldval;
Roxen.git/server/protocols/http.pike:1108:    if (mixed err = catch {    contents = http_decode_string (Standards.URI(contents,    "dummy:")->path);    }) {   #ifdef DEBUG    report_debug(sprintf("Destination header contained a bad URI: %O\n"    "%s", contents, describe_error(err)));   #endif /* DEBUG */    }    misc["new-uri"] = VFS.normalize_path (contents); +  if (String.width(misc["new-uri"]) > 8) { +  misc["new-uri"] = Unicode.normalize(misc["new-uri"], "NFC"); +  }    break;       case "expect":    // RFC 2616, section 14.20: "A server that does not    // understand or is unable to comply with any of the    // expectation values in the Expect field of a request MUST    // respond with appropriate error status." We only handle the    // standard 100-continue case (see ready_to_receive).    // Also: "Comparison of expectation values is case-insensitive    // for unquoted tokens (including the 100-continue token), and