Commit 86fd9acf authored by Will Hodges's avatar Will Hodges Committed by Dave Watson

Add setPort() to folly::URI class.

Summary:
Add setPort() method to URI class for easy port replacement in
URIs.

Facebook:
Perform port replacement in WriteProcessor.cpp in a way that
supports URI schemes. Add setPort() method to URI class to replace
the port number in the authority portion of the URI.

Test Plan: Test in debugger for dfsrouter changes.

Reviewed By: tudorb@fb.com

FB internal diff: D1209120
parent 85cf7e60
...@@ -61,6 +61,8 @@ class Uri { ...@@ -61,6 +61,8 @@ class Uri {
std::string str() const { return toString<std::string>(); } std::string str() const { return toString<std::string>(); }
fbstring fbstr() const { return toString<fbstring>(); } fbstring fbstr() const { return toString<fbstring>(); }
void setPort(uint16_t port) {port_ = port;}
private: private:
fbstring scheme_; fbstring scheme_;
fbstring username_; fbstring username_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment