Skip to content

Commit

Permalink
Add uri_builder::append_path_raw(...) to allow adding elements to pat…
Browse files Browse the repository at this point in the history
…h intentionally beginning with '/' ("//" will results in the final path value) (#958)

* add append_path_raw() to uri_builder

* modify implementation details

* modified test case

* fixed append_path_raw and included a testscase for a trailing slash with that API

* update submodule to vcpkg master due to the NuGet hash changes

* Avoid double encoding through set_path and add tests. Extract single slash string comparison. Reduce string copy count. Add VS Code settings and launch.

* Optimize append_path similarly.

* Also optimize append_query.

* Also optimize other uri_builder things.

* Avoid self references.
  • Loading branch information
dangrif authored and BillyONeal committed Nov 12, 2018
1 parent aabec3c commit 19d2ebb
Show file tree
Hide file tree
Showing 6 changed files with 513 additions and 309 deletions.
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch Debug Tests",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build.debug/Release/Binaries/test_runner.exe",
"args": ["*testd.dll"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build.debug/Release/Binaries",
"environment": [],
"externalConsole": true
}
]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/vcpkg/**": true
}
}
5 changes: 2 additions & 3 deletions Release/include/cpprest/base_uri.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
#pragma once

#include <map>
#include <memory>
#include <string>
#include <vector>
#include <functional>
#include <utility>

#include "cpprest/asyncrt_utils.h"
#include "cpprest/details/basic_types.h"
Expand Down Expand Up @@ -421,4 +420,4 @@ namespace web {
details::uri_components m_components;
};

} // namespace web
} // namespace web
Loading

0 comments on commit 19d2ebb

Please sign in to comment.