Fix url parsing in test code
Bug: 300696974 Change-Id: Ic9a158ed0c2e7434d3a4b669a7d301999f29449e
This commit is contained in:
committed by
Robert Shih
parent
386ca20974
commit
1548fe5c98
@@ -32,9 +32,7 @@ class HttpSocket {
|
||||
const std::string& domain_name() const { return domain_name_; }
|
||||
int port() const { return atoi(port_.c_str()); }
|
||||
const std::string& resource_path() const { return resource_path_; }
|
||||
std::string url() const {
|
||||
return scheme_ + "://" + domain_name_ + ":" + port_ + resource_path_;
|
||||
}
|
||||
const std::string& url() const { return url_; }
|
||||
|
||||
int ReadAndLogErrors(char* data, int len, int timeout_in_ms);
|
||||
int WriteAndLogErrors(const char* data, int len, int timeout_in_ms);
|
||||
@@ -57,6 +55,7 @@ class HttpSocket {
|
||||
bool Wait(bool for_read, int timeout_in_ms);
|
||||
FRIEND_TEST(HttpSocketTest, ParseUrlTest);
|
||||
|
||||
std::string url_;
|
||||
std::string scheme_;
|
||||
bool secure_connect_;
|
||||
std::string domain_name_;
|
||||
|
||||
Reference in New Issue
Block a user