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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/HTTP.pmod/module.pmod:43:   constant HTTP_REQ_TOO_LARGE = 413; // RFC 2616 10.4.14: Request Entity Too Large   constant HTTP_URI_TOO_LONG = 414; // RFC 2616 10.4.15: Request-URI Too Long   constant HTTP_UNSUPP_MEDIA = 415; // RFC 2616 10.4.16: Unsupported Media Type   constant HTTP_BAD_RANGE = 416; // RFC 2616 10.4.17: Requested Range Not Satisfiable   constant HTTP_EXPECT_FAILED = 417; // RFC 2616 10.4.18: Expectation Failed   constant HTCPCP_TEAPOT = 418; // RFC 2324 2.3.2: I'm a teapot   constant DAV_UNPROCESSABLE = 422; // RFC 2518 10.3: Unprocessable Entry   constant DAV_LOCKED = 423; // RFC 2518 10.4: Locked   constant DAV_FAILED_DEP = 424; // RFC 2518 10.5: Failed Dependency    + constant HTTP_LEGALLY_RESTRICTED= 451; // Draft: Unavailable for Legal Reasons +    // Server errors   constant HTTP_INTERNAL_ERR = 500; // RFC 2616 10.5.1: Internal Server Error   constant HTTP_NOT_IMPL = 501; // RFC 2616 10.5.2: Not Implemented   constant HTTP_BAD_GW = 502; // RFC 2616 10.5.3: Bad Gateway   constant HTTP_UNAVAIL = 503; // RFC 2616 10.5.4: Service Unavailable   constant HTTP_GW_TIMEOUT = 504; // RFC 2616 10.5.5: Gateway Timeout   constant HTTP_UNSUPP_VERSION = 505; // RFC 2616 10.5.6: HTTP Version Not Supported   constant TCN_VARIANT_NEGOTIATES = 506; // RFC 2295 8.1: Variant Also Negotiates   constant DAV_STORAGE_FULL = 507; // RFC 2518 10.6: Insufficient Storage   
pike.git/lib/modules/Protocols.pmod/HTTP.pmod/module.pmod:109:    414:"414 Request-URI Too Large",    415:"415 Unsupported Media Type",    416:"416 Requested range not statisfiable",    417:"417 Expectation Failed",    418:"418 I'm a teapot", // Ha ha    422:"422 Unprocessable Entity", // WebDAV    423:"423 Locked", // WebDAV    424:"424 Failed Dependency", // WebDAV    425:"425 Unordered Collection", // RFC3648    426:"426 Upgrade Required", // RFC2817 +  451:"451 Unavailable for Legal Reasons", // draft-tbray-http-legally-restricted-status       // Internal Server Errors    500:"500 Internal Server Error.",    501:"501 Not Implemented",    502:"502 Bad Gateway",    503:"503 Service unavailable",    504:"504 Gateway Timeout",    505:"505 HTTP Version Not Supported",    506:"506 Variant Also Negotiates", // RFC2295    507:"507 Insufficient Storage", // WebDAV / RFC4918
pike.git/lib/modules/Protocols.pmod/HTTP.pmod/module.pmod:655:    void|Protocols.HTTP.Query con)   {    .Query c;    multiset seen = (<>);    do {    if(!url) return 0;    if(seen[url] || sizeof(seen)>1000) return 0;    seen[url]=1;    c = get_url(url, query_variables, request_headers, con);    if(!c) return 0; -  if(c->status==302) url = c->headers->location; +  if(c->status==302) +  url = Standards.URI(c->headers->location, url);    } while( c->status!=200 );    return ({ c->headers["content-type"], c->data() });   }      //! Returns the returned data after calling the requested server for   //! information through HTTP GET. @expr{0@} is returned upon failure.   //! Redirects (HTTP 302) are automatically followed.   //!   string get_url_data(string|Standards.URI url,    void|mapping(string:int|string|array(string)) query_variables,