proxygen
|
#include <ParseURL.h>
Public Member Functions | |
ParseURL () | |
ParseURL (folly::StringPiece urlVal) noexcept | |
void | init (folly::StringPiece urlVal) |
folly::StringPiece | url () const |
folly::StringPiece | scheme () const |
std::string | authority () const |
bool | hasHost () const |
folly::StringPiece | host () const |
uint16_t | port () const |
std::string | hostAndPort () const |
folly::StringPiece | path () const |
folly::StringPiece | query () const |
folly::StringPiece | fragment () const |
bool | valid () const |
folly::StringPiece | hostNoBrackets () |
bool | hostIsIPAddress () |
FB_EXPORT void | stripBrackets () noexcept |
Private Member Functions | |
FB_EXPORT void | parse () noexcept |
void | parseNonFully () noexcept |
bool | parseAuthority () noexcept |
Private Attributes | |
folly::StringPiece | url_ |
folly::StringPiece | scheme_ |
std::string | authority_ |
folly::StringPiece | host_ |
folly::StringPiece | hostNoBrackets_ |
folly::StringPiece | path_ |
folly::StringPiece | query_ |
folly::StringPiece | fragment_ |
uint16_t | port_ {0} |
bool | valid_ {false} |
bool | initialized_ {false} |
Definition at line 22 of file ParseURL.h.
|
inline |
Definition at line 24 of file ParseURL.h.
|
inlineexplicitnoexcept |
|
inline |
Definition at line 44 of file ParseURL.h.
References authority_.
Referenced by proxygen::HTTPMessage::setQueryString(), and testParseURL().
|
inline |
Definition at line 76 of file ParseURL.h.
References fragment_.
Referenced by proxygen::HTTPMessage::setQueryString(), and proxygen::URL::URL().
|
inline |
Definition at line 48 of file ParseURL.h.
References folly::Range< Iter >::empty(), host_, and valid().
Referenced by proxygen::HTTP1xCodec::onHeadersComplete().
|
inline |
Definition at line 52 of file ParseURL.h.
References host_.
Referenced by TEST(), and testParseURL().
|
inline |
Definition at line 60 of file ParseURL.h.
References host_, port_, folly::Range< Iter >::str(), string, and folly::toAppend().
Referenced by proxygen::HTTP1xCodec::onHeadersComplete().
bool proxygen::ParseURL::hostIsIPAddress | ( | ) |
Definition at line 177 of file ParseURL.cpp.
References folly::Range< Iter >::find(), hostNoBrackets_, folly::Range< Iter >::str(), stripBrackets(), and valid_.
Referenced by hostNoBrackets(), and testHostIsIpAddress().
|
inline |
Definition at line 84 of file ParseURL.h.
References FB_EXPORT, hostIsIPAddress(), hostNoBrackets_, folly::pushmi::__adl::noexcept(), parse(), parseAuthority(), parseNonFully(), and stripBrackets().
Referenced by TEST(), and proxygen::URL::URL().
|
inline |
Definition at line 29 of file ParseURL.h.
References initialized_, parse(), and url_.
Referenced by ParseURL().
|
privatenoexcept |
Definition at line 60 of file ParseURL.cpp.
References authority_, folly::Range< Iter >::data(), http_parser_url::field_data, fragment_, host_, http_parser_parse_url(), http_parser_url::len, http_parser_url::off, parseNonFully(), path_, http_parser_url::port, port_, query_, scheme_, folly::Range< Iter >::size(), folly::Range< Iter >::str(), folly::Range< Iter >::subpiece(), UF_FRAGMENT, UF_HOST, UF_PATH, UF_QUERY, UF_SCHEMA, url_, valid_, and proxygen::validateScheme().
Referenced by hostNoBrackets(), and init().
|
privatenoexcept |
Definition at line 150 of file ParseURL.cpp.
References authority_, host_, and port_.
Referenced by hostNoBrackets(), and parseNonFully().
|
privatenoexcept |
Definition at line 102 of file ParseURL.cpp.
References authority_, folly::Range< Iter >::empty(), folly::Range< Iter >::find(), fragment_, min, parseAuthority(), path_, query_, folly::Range< Iter >::str(), folly::Range< Iter >::subpiece(), url_, valid_, and proxygen::validateURL().
Referenced by hostNoBrackets(), and parse().
|
inline |
Definition at line 68 of file ParseURL.h.
References path_.
Referenced by proxygen::HTTPMessage::setQueryString(), proxygen::HTTPMessage::setURL(), testParseURL(), and proxygen::URL::URL().
|
inline |
Definition at line 56 of file ParseURL.h.
References port_.
Referenced by testParseURL(), and proxygen::URL::URL().
|
inline |
Definition at line 72 of file ParseURL.h.
References query_.
Referenced by proxygen::HTTPMessage::setURL(), testParseURL(), and proxygen::URL::URL().
|
inline |
Definition at line 40 of file ParseURL.h.
References scheme_.
Referenced by proxygen::HTTPMessage::setQueryString(), testParseURL(), and proxygen::URL::URL().
|
noexcept |
Definition at line 192 of file ParseURL.cpp.
References folly::Range< Iter >::back(), folly::Range< Iter >::empty(), folly::Range< Iter >::front(), host_, hostNoBrackets_, folly::Range< Iter >::size(), and folly::Range< Iter >::subpiece().
Referenced by hostIsIPAddress(), and hostNoBrackets().
|
inline |
Definition at line 36 of file ParseURL.h.
References url_.
Referenced by testParseURL(), and proxygen::URL::URL().
|
inline |
Definition at line 80 of file ParseURL.h.
References valid_.
Referenced by hasHost(), proxygen::HTTPMessage::setQueryString(), proxygen::HTTPMessage::setURL(), and testParseURL().
|
private |
Definition at line 102 of file ParseURL.h.
Referenced by authority(), parse(), parseAuthority(), and parseNonFully().
|
private |
Definition at line 107 of file ParseURL.h.
Referenced by fragment(), parse(), and parseNonFully().
|
private |
Definition at line 103 of file ParseURL.h.
Referenced by hasHost(), host(), hostAndPort(), parse(), parseAuthority(), and stripBrackets().
|
private |
Definition at line 104 of file ParseURL.h.
Referenced by hostIsIPAddress(), hostNoBrackets(), and stripBrackets().
|
private |
Definition at line 110 of file ParseURL.h.
Referenced by init().
|
private |
Definition at line 105 of file ParseURL.h.
Referenced by parse(), parseNonFully(), and path().
|
private |
Definition at line 108 of file ParseURL.h.
Referenced by hostAndPort(), parse(), parseAuthority(), and port().
|
private |
Definition at line 106 of file ParseURL.h.
Referenced by parse(), parseNonFully(), and query().
|
private |
Definition at line 101 of file ParseURL.h.
|
private |
Definition at line 100 of file ParseURL.h.
Referenced by init(), parse(), parseNonFully(), and url().
|
private |
Definition at line 109 of file ParseURL.h.
Referenced by hostIsIPAddress(), parse(), parseNonFully(), and valid().