Skip to content

Commit

Permalink
Merge pull request #173 from hugglesfox/upstream_fix_uri_splitting
Browse files Browse the repository at this point in the history
Fix uri splitting when a / isn't before args
  • Loading branch information
macite authored Apr 9, 2024
2 parents c27fa34 + 44b60af commit 3142b8f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions coresdk/src/coresdk/web_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,14 @@ namespace splashkit_lib

vector<string> split_uri_stubs(const string &uri)
{
stringstream ss(uri);
stringstream stubs;
string stub;
vector<string> result;

while (getline(ss, stub, '/'))
// Ensure args are removed if there isn't a / before the ?
stubs = (stringstream) uri.substr(0, uri.find('?'));

while (getline(stubs, stub, '/'))
{
result.push_back(stub);
}
Expand Down

0 comments on commit 3142b8f

Please sign in to comment.