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
7788a797
Commit
7788a797
authored
Nov 27, 2020
by
hyperxor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clang format
parent
0a3ee82c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
include/pistache/http.h
include/pistache/http.h
+3
-3
src/common/http.cc
src/common/http.cc
+8
-6
src/common/peer.cc
src/common/peer.cc
+1
-3
No files found.
include/pistache/http.h
View file @
7788a797
...
...
@@ -416,9 +416,9 @@ public:
ResponseWriter
clone
()
const
;
std
::
shared_ptr
<
Tcp
::
Peer
>
getPeer
()
const
{
if
(
auto
sp
=
peer_
.
lock
())
return
sp
;
return
nullptr
;
if
(
auto
sp
=
peer_
.
lock
())
return
sp
;
return
nullptr
;
}
private:
...
...
src/common/http.cc
View file @
7788a797
...
...
@@ -423,12 +423,12 @@ BodyStep::Chunk::Result BodyStep::Chunk::parse(StreamCursor &cursor) {
if
(
available
+
alreadyAppendedChunkBytes
<
size
+
2
)
{
cursor
.
advance
(
available
);
message
->
body_
.
append
(
chunkData
.
rawText
(),
available
);
alreadyAppendedChunkBytes
+=
available
;
alreadyAppendedChunkBytes
+=
available
;
return
Incomplete
;
}
cursor
.
advance
(
size
-
alreadyAppendedChunkBytes
);
//trailing EOL
//
trailing EOL
cursor
.
advance
(
2
);
message
->
body_
.
append
(
chunkData
.
rawText
(),
size
-
alreadyAppendedChunkBytes
);
...
...
@@ -798,8 +798,10 @@ Async::Promise<ssize_t> ResponseWriter::putOnWire(const char *data,
.
then
<
std
::
function
<
Async
::
Promise
<
ssize_t
>
(
ssize_t
)
>
,
std
::
function
<
void
(
std
::
exception_ptr
&
)
>>
(
[
=
](
int
/*l*/
)
{
return
Async
::
Promise
<
ssize_t
>
([
=
](
Async
::
Deferred
<
ssize_t
>
/*deferred*/
)
mutable
{
return
;
});
return
Async
::
Promise
<
ssize_t
>
(
[
=
](
Async
::
Deferred
<
ssize_t
>
/*deferred*/
)
mutable
{
return
;
});
},
[
=
](
std
::
exception_ptr
&
eptr
)
{
...
...
@@ -922,7 +924,7 @@ void Handler::onInput(const char *buffer, size_t len,
}
auto
state
=
parser
->
parse
();
auto
&
request
=
parser
->
request
;
auto
&
request
=
parser
->
request
;
if
(
state
==
Private
::
State
::
Done
)
{
ResponseWriter
response
(
transport
(),
request
,
this
,
peer
);
...
...
src/common/peer.cc
View file @
7788a797
...
...
@@ -82,9 +82,7 @@ void Peer::setParser(std::shared_ptr<Http::RequestParser> parser) {
parser_
=
parser
;
}
std
::
shared_ptr
<
Http
::
RequestParser
>
Peer
::
getParser
()
const
{
return
parser_
;
}
std
::
shared_ptr
<
Http
::
RequestParser
>
Peer
::
getParser
()
const
{
return
parser_
;
}
Async
::
Promise
<
ssize_t
>
Peer
::
send
(
const
RawBuffer
&
buffer
,
int
flags
)
{
return
transport
()
->
asyncWrite
(
fd_
,
buffer
,
flags
);
...
...
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