Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pistache
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
pistache
Commits
3a72456c
Unverified
Commit
3a72456c
authored
Mar 17, 2020
by
Igor [hyperxor]
Committed by
GitHub
Mar 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant copy in Request API getter (#738)
parent
e623e353
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
include/pistache/http.h
include/pistache/http.h
+1
-1
src/common/http.cc
src/common/http.cc
+1
-1
tests/http_client_test.cc
tests/http_client_test.cc
+2
-1
No files found.
include/pistache/http.h
View file @
3a72456c
...
...
@@ -160,7 +160,7 @@ public:
Request
&
operator
=
(
Request
&&
other
)
=
default
;
Method
method
()
const
;
std
::
string
resource
()
const
;
const
std
::
string
&
resource
()
const
;
const
Uri
::
Query
&
query
()
const
;
...
...
src/common/http.cc
View file @
3a72456c
...
...
@@ -549,7 +549,7 @@ CookieJar &Message::cookies() { return cookies_; }
Method
Request
::
method
()
const
{
return
method_
;
}
std
::
string
Request
::
resource
()
const
{
return
resource_
;
}
const
std
::
string
&
Request
::
resource
()
const
{
return
resource_
;
}
const
Uri
::
Query
&
Request
::
query
()
const
{
return
query_
;
}
...
...
tests/http_client_test.cc
View file @
3a72456c
...
...
@@ -33,7 +33,8 @@ struct FastEvenPagesHandler : public Http::Handler {
void
onRequest
(
const
Http
::
Request
&
request
,
Http
::
ResponseWriter
writer
)
override
{
std
::
string
page
=
request
.
resource
().
erase
(
0
,
1
);
std
::
string
page
=
request
.
resource
();
page
.
erase
(
0
,
1
);
int
num
=
std
::
stoi
(
page
);
if
(
num
%
2
!=
0
)
{
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
milliseconds
(
2500
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment