mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
fixes url fragment parsing and adds url fragment and query parsing unit tests fixes #23
This commit is contained in:
@@ -136,11 +136,9 @@ std::string lookup_ws_close_status_string(uint16_t code) {
|
||||
|
||||
bool websocketpp::ws_uri::parse(const std::string& uri) {
|
||||
boost::cmatch what;
|
||||
static const boost::regex expression("(ws|wss)://([^/:\\[]+|\\[[0-9:]+\\])(:\\d{1,5})?(/.*)?");
|
||||
static const boost::regex expression("(ws|wss)://([^/:\\[]+|\\[[0-9:]+\\])(:\\d{1,5})?(/[^#]*)?");
|
||||
|
||||
// TODO: finish section 3 conformance:
|
||||
// - forbid # character (fragment is meaningless to websocket
|
||||
// - maybe split out query portion into path/query?
|
||||
// TODO: should this split resource into path/query?
|
||||
|
||||
if (boost::regex_match(uri.c_str(), what, expression)) {
|
||||
if (what[1] == "wss") {
|
||||
|
||||
Reference in New Issue
Block a user