pike.git/lib/modules/Protocols.pmod/HTTP.pmod/module.pmod:188:
if( query_variables )
url->set_query_variables( url->get_query_variables() +
query_variables );
string web_url = (string)url;
// Note: url object is wrecked here
url->host = proxy->host;
url->port = proxy->port;
query_variables = url->query = 0;
url->path = web_url;
- #if constant(SSL.sslfile)
+ #if constant(SSL.File)
} else if (url->scheme == "https") {
#ifdef HTTP_QUERY_DEBUG
werror("Proxied SSL request.\n");
#endif
if (!con || (con->host != url->host) || (con->port != url->port)) {
// Make a CONNECT request to the proxy,
// and use keep-alive to stack the real request on top.
proxy->path = url->host + ":" + url->port;
if (!proxy_headers) proxy_headers = ([]);
proxy_headers->connection = "keep-alive";
pike.git/lib/modules/Protocols.pmod/HTTP.pmod/module.pmod:213: Inside #if constant(SSL.sslfile)
return con;
}
con->headers["connection"] = "keep-alive";
con->headers["content-length"] = "0";
con->host = url->host;
con->port = url->port;
con->https = 1;
con->start_tls(1);
}
proxy_headers = request_headers;
- #endif
+ #endif /* constant(SSL.File) */
} else {
error("Can't handle proxying of %O.\n", url->scheme);
}
return do_method(method, url, query_variables, proxy_headers, con, data);
}
//! Low level HTTP call method.
//!
//! @param method
pike.git/lib/modules/Protocols.pmod/HTTP.pmod/module.pmod:260:
url=Standards.URI(url);
if( (< "httpu", "httpmu" >)[url->scheme] ) {
return do_udp_method(method, url, query_variables, request_headers,
con, data);
}
if(!con)
con = .Query();
- #if constant(SSL.sslfile)
+ #if constant(SSL.File)
if(url->scheme!="http" && url->scheme!="https")
error("Can't handle %O or any other protocols than HTTP or HTTPS.\n",
url->scheme);
con->https = (url->scheme=="https")? 1 : 0;
#else
if(url->scheme!="http")
error("Can't handle %O or any other protocol than HTTP "
"(HTTPS requires Nettle support).\n",
url->scheme);
- #endif
+ #endif /* constant(SSL.File) */
mapping default_headers = ([
"user-agent" : "Mozilla/5.0 (compatible; MSIE 6.0; Pike HTTP client)"
" Pike/" + __REAL_MAJOR__ + "." + __REAL_MINOR__ + "." + __REAL_BUILD__,
"host" : url->host +
(url->port!=(url->scheme=="https"?443:80)?":"+url->port:"")]);
if(url->user || url->password)
default_headers->authorization = "Basic "
+ MIME.encode_base64(url->user + ":" +
pike.git/lib/modules/Protocols.pmod/HTTP.pmod/module.pmod:396:
void|mapping(string:string|array(string)) request_headers,
Protocols.HTTP.Query con, void|string data)
{
if(stringp(url))
url=Standards.URI(url);
if( (< "httpu", "httpmu" >)[url->scheme] ) {
error("Asynchronous httpu or httpmu not yet supported.\n");
}
- #if constant(SSL.sslfile)
+ #if constant(SSL.File)
if(url->scheme!="http" && url->scheme!="https")
error("Can't handle %O or any other protocols than HTTP or HTTPS.\n",
url->scheme);
con->https = (url->scheme=="https")? 1 : 0;
#else
if(url->scheme!="http")
error("Can't handle %O or any other protocol than HTTP.\n",
url->scheme);
- #endif
+ #endif /* constant(SSL.File) */
if(!request_headers)
request_headers = ([]);
mapping default_headers = ([
"user-agent" : "Mozilla/5.0 (compatible; MSIE 6.0; Pike HTTP client)"
" Pike/" + __REAL_MAJOR__ + "." + __REAL_MINOR__ + "." + __REAL_BUILD__,
"host" : url->host +
(url->port!=(url->scheme=="https"?443:80)?":"+url->port:"")]);
if(url->user || url->passwd)
pike.git/lib/modules/Protocols.pmod/HTTP.pmod/module.pmod:560:
if( query_variables )
url->set_query_variables( url->get_query_variables() +
query_variables );
string web_url = (string)url;
// Note: url object is wrecked here
url->host = proxy->host;
url->port = proxy->port;
query_variables = url->query = 0;
url->path = web_url;
- #if constant(SSL.sslfile)
+ #if constant(SSL.File)
} else if(url->scheme == "https") {
#ifdef HTTP_QUERY_DEBUG
werror("Proxied SSL request.\n");
#endif
if (!con || (con->host != url->host) || (con->port != url->port)) {
// Make a CONNECT request to the proxy,
// and use keep-alive to stack the real request on top.
proxy->path = url->host + ":" + url->port;
if (!proxy_headers) proxy_headers = ([]);
proxy_headers->connection = "keep-alive";