MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / Download

Method Download

cpp/src/platform/HttpClient.cpp:1001–1025  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

999}
1000
1001bool HttpSocket::Download
1002(
1003const std::string& url,
1004const char *extraRequest,
1005void *user,
1006const POST *post
1007)
1008{
1009 if (_filename.length() == 0) {
1010 traceprint("No Filename Set\n");
1011 return false;
1012 }
1013 Request req;
1014 req.user = user;
1015 if(post)
1016 req.post = *post;
1017 SplitURI(url, req.protocol, req.host, req.resource, req.port, req.useSSL);
1018 if(IsRedirecting() && req.host.empty()) // if we're following a redirection to the same host, the server is likely to omit its hostname
1019 req.host = _curRequest.host;
1020 if(req.port < 0)
1021 req.port = req.useSSL ? 443 : 80;
1022 if(extraRequest)
1023 req.extraGetHeaders = extraRequest;
1024 return SendRequest(req, false);
1025}
1026
1027
1028bool HttpSocket::_Redirect

Callers 1

HttpThreadProcMethod · 0.80

Calls 3

SplitURIFunction · 0.85
lengthMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected