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

version» Context lines:

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,