Roxen.git / server / etc / modules / Roxen.pmod

version» Context lines:

Roxen.git/server/etc/modules/Roxen.pmod:4723:    if (!id->my_fd || !id->my_fd->get_peer_certificate_info ||    !id->my_fd->query_connection())    return 0;    return id->my_fd->query_connection()->session->cipher_spec->key_bits;   }      string hash_query_data(string ignored, RequestID id)   {    // Some common cases.    if (!id->data) return 0; +  if (zero_type(id->misc->len)) return 0;    if (id->data == "") return "";    return Crypto.SHA1.hash(id->data);   }      class ScopePage {    inherit RXML.Scope;    constant converter=(["fgcolor":"fgcolor", "bgcolor":"bgcolor",    "theme-bgcolor":"theme_bgcolor", "theme-fgcolor":"theme_fgcolor",    "theme-language":"theme_language"]);   
Roxen.git/server/etc/modules/Roxen.pmod:4761:    case "virtroot": return ENCODE_RXML_TEXT(c->id->virtfile, type);    case "mountpoint":    string s = c->id->virtfile || "";    return ENCODE_RXML_TEXT(s[sizeof(s)-1..sizeof(s)-1] == "/"? s[..sizeof(s)-2]: s, type);    case "virtfile": // Fallthrough from deprecated name.    case "path": return ENCODE_RXML_TEXT(c->id->not_query, type);    case "query": return ENCODE_RXML_TEXT(c->id->query, type);    case "url": return ENCODE_RXML_TEXT(c->id->raw_url, type);    case "post-data":    c->id->register_vary_callback(0, hash_query_data); -  return c->id->data ? ENCODE_RXML_TEXT(c->id->data, type) : RXML.nil; +  if (!c->id->data || zero_type(c->id->misc->len)) return RXML.nil; +  return ENCODE_RXML_TEXT(c->id->data, type);    case "last-true": return ENCODE_RXML_INT(c->misc[" _ok"], type);    case "language": return ENCODE_RXML_TEXT(c->misc->language, type);    case "scope": return ENCODE_RXML_TEXT(c->current_scope(), type);    case "filesize": return ENCODE_RXML_INT(c->misc[" _stat"]?    c->misc[" _stat"][1]:-4, type);    case "self": return ENCODE_RXML_TEXT( (c->id->not_query/"/")[-1], type);    case "ssl-strength":    c->id->register_vary_callback("host", get_ssl_strength);    return ENCODE_RXML_INT(get_ssl_strength("", c->id), type);    case "dir":