From 86fd9acf3fd36e7c54b62bf476dd905803bd7d8d Mon Sep 17 00:00:00 2001 From: Will Hodges Date: Mon, 10 Mar 2014 10:15:35 -0700 Subject: [PATCH] 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 --- folly/Uri.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/folly/Uri.h b/folly/Uri.h index bbee0bd3..29711197 100644 --- a/folly/Uri.h +++ b/folly/Uri.h @@ -61,6 +61,8 @@ class Uri { std::string str() const { return toString(); } fbstring fbstr() const { return toString(); } + void setPort(uint16_t port) {port_ = port;} + private: fbstring scheme_; fbstring username_; -- 2.34.1