Skip to content

Commit 19d2ebb

Browse files
dangrifBillyONeal
authored andcommitted
Add uri_builder::append_path_raw(...) to allow adding elements to path 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.
1 parent aabec3c commit 19d2ebb

File tree

6 files changed

+513
-309
lines changed

6 files changed

+513
-309
lines changed

.vscode/launch.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "(Windows) Launch Debug Tests",
9+
"type": "cppvsdbg",
10+
"request": "launch",
11+
"program": "${workspaceFolder}/build.debug/Release/Binaries/test_runner.exe",
12+
"args": ["*testd.dll"],
13+
"stopAtEntry": false,
14+
"cwd": "${workspaceFolder}/build.debug/Release/Binaries",
15+
"environment": [],
16+
"externalConsole": true
17+
}
18+
]
19+
}

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"files.watcherExclude": {
3+
"**/.git/objects/**": true,
4+
"**/.git/subtree-cache/**": true,
5+
"**/node_modules/*/**": true,
6+
"**/vcpkg/**": true
7+
}
8+
}

Release/include/cpprest/base_uri.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
#pragma once
1515

1616
#include <map>
17-
#include <memory>
1817
#include <string>
1918
#include <vector>
20-
#include <functional>
19+
#include <utility>
2120

2221
#include "cpprest/asyncrt_utils.h"
2322
#include "cpprest/details/basic_types.h"
@@ -421,4 +420,4 @@ namespace web {
421420
details::uri_components m_components;
422421
};
423422

424-
} // namespace web
423+
} // namespace web

0 commit comments

Comments
 (0)