pike.git / lib / modules / Protocols.pmod / HTTP.pmod / module.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/HTTP.pmod/module.pmod:142:    request_headers, data);       if (!con->ok) {    if (con->errno)    error ("I/O error: %s\n", strerror (con->errno));    return 0;    }    return con;   }    - static .Query do_udp_method(string method, Standards.URI url, + protected .Query do_udp_method(string method, Standards.URI url,    void|mapping(string:int|string) query_variables,    void|mapping(string:string|array(string))    request_headers, void|Protocols.HTTP.Query con,    void|string data)   {    if(!request_headers)    request_headers = ([]);       string path = url->path;    if(path=="") {
pike.git/lib/modules/Protocols.pmod/HTTP.pmod/module.pmod:434:    return    http_encode_string(v[0])+"="+    http_encode_string(val);    })*"&";    return http_encode_string(v[0])+"="+    http_encode_string(v[1]);    })*"&";   }      // RFC 1738, 2.2. URL Character Encoding Issues - static constant url_non_corresponding = enumerate(0x21) + + protected constant url_non_corresponding = enumerate(0x21) +    enumerate(0x81,1,0x7f); - static constant url_unsafe = ({ '<', '>', '"', '#', '%', '{', '}', + protected constant url_unsafe = ({ '<', '>', '"', '#', '%', '{', '}',    '|', '\\', '^', '~', '[', ']', '`' }); - static constant url_reserved = ({ ';', '/', '?', ':', '@', '=', '&' }); + protected constant url_reserved = ({ ';', '/', '?', ':', '@', '=', '&' });      // Encode these chars - static constant url_chars = url_non_corresponding + url_unsafe + + protected constant url_chars = url_non_corresponding + url_unsafe +    url_reserved + ({ '+', '\'' }); - static constant url_from = sprintf("%c", url_chars[*]); - static constant url_to = sprintf("%%%02x", url_chars[*]); + protected constant url_from = sprintf("%c", url_chars[*]); + protected constant url_to = sprintf("%%%02x", url_chars[*]);         //! This protects all odd - see @[http_encode_query()] -   //! characters for transfer in HTTP.   //!   //! Do not use this function to protect URLs, since   //! it will protect URL characters like @expr{'/'@} and @expr{'?'@}.   //! @param in   //! The string to encode   //! @returns