Skip to content

Commit 6d5f5d1

Browse files
author
Julian Picht
committed
FIX: regex-matching was broken if (!family_url)
When creating endpoints like ws.register_resource("/hello/{test|[0-9]+}", &hwr, false); the match never succeeded, because the regex was matched against the modded request URL which contained '^' and '$'.
1 parent a7d349a commit 6d5f5d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/details/http_endpoint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ bool http_endpoint::match(const http_endpoint& url) const
226226
}
227227
else
228228
return regexec(&(this->re_url_modded),
229-
url.url_modded.c_str(), 0, NULL, 0) == 0;
229+
url.url_complete.c_str(), 0, NULL, 0) == 0;
230230
}
231231

232232
};

0 commit comments

Comments
 (0)