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
Show 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
src/common/http.cc
View file @
7788a797
...
@@ -423,12 +423,12 @@ BodyStep::Chunk::Result BodyStep::Chunk::parse(StreamCursor &cursor) {
...
@@ -423,12 +423,12 @@ BodyStep::Chunk::Result BodyStep::Chunk::parse(StreamCursor &cursor) {
if
(
available
+
alreadyAppendedChunkBytes
<
size
+
2
)
{
if
(
available
+
alreadyAppendedChunkBytes
<
size
+
2
)
{
cursor
.
advance
(
available
);
cursor
.
advance
(
available
);
message
->
body_
.
append
(
chunkData
.
rawText
(),
available
);
message
->
body_
.
append
(
chunkData
.
rawText
(),
available
);
alreadyAppendedChunkBytes
+=
available
;
alreadyAppendedChunkBytes
+=
available
;
return
Incomplete
;
return
Incomplete
;
}
}
cursor
.
advance
(
size
-
alreadyAppendedChunkBytes
);
cursor
.
advance
(
size
-
alreadyAppendedChunkBytes
);
//trailing EOL
//
trailing EOL
cursor
.
advance
(
2
);
cursor
.
advance
(
2
);
message
->
body_
.
append
(
chunkData
.
rawText
(),
size
-
alreadyAppendedChunkBytes
);
message
->
body_
.
append
(
chunkData
.
rawText
(),
size
-
alreadyAppendedChunkBytes
);
...
@@ -798,8 +798,10 @@ Async::Promise<ssize_t> ResponseWriter::putOnWire(const char *data,
...
@@ -798,8 +798,10 @@ Async::Promise<ssize_t> ResponseWriter::putOnWire(const char *data,
.
then
<
std
::
function
<
Async
::
Promise
<
ssize_t
>
(
ssize_t
)
>
,
.
then
<
std
::
function
<
Async
::
Promise
<
ssize_t
>
(
ssize_t
)
>
,
std
::
function
<
void
(
std
::
exception_ptr
&
)
>>
(
std
::
function
<
void
(
std
::
exception_ptr
&
)
>>
(
[
=
](
int
/*l*/
)
{
[
=
](
int
/*l*/
)
{
return
Async
::
Promise
<
ssize_t
>
([
=
](
return
Async
::
Promise
<
ssize_t
>
(
Async
::
Deferred
<
ssize_t
>
/*deferred*/
)
mutable
{
return
;
});
[
=
](
Async
::
Deferred
<
ssize_t
>
/*deferred*/
)
mutable
{
return
;
});
},
},
[
=
](
std
::
exception_ptr
&
eptr
)
{
[
=
](
std
::
exception_ptr
&
eptr
)
{
...
@@ -922,7 +924,7 @@ void Handler::onInput(const char *buffer, size_t len,
...
@@ -922,7 +924,7 @@ void Handler::onInput(const char *buffer, size_t len,
}
}
auto
state
=
parser
->
parse
();
auto
state
=
parser
->
parse
();
auto
&
request
=
parser
->
request
;
auto
&
request
=
parser
->
request
;
if
(
state
==
Private
::
State
::
Done
)
{
if
(
state
==
Private
::
State
::
Done
)
{
ResponseWriter
response
(
transport
(),
request
,
this
,
peer
);
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) {
...
@@ -82,9 +82,7 @@ void Peer::setParser(std::shared_ptr<Http::RequestParser> parser) {
parser_
=
parser
;
parser_
=
parser
;
}
}
std
::
shared_ptr
<
Http
::
RequestParser
>
Peer
::
getParser
()
const
{
std
::
shared_ptr
<
Http
::
RequestParser
>
Peer
::
getParser
()
const
{
return
parser_
;
}
return
parser_
;
}
Async
::
Promise
<
ssize_t
>
Peer
::
send
(
const
RawBuffer
&
buffer
,
int
flags
)
{
Async
::
Promise
<
ssize_t
>
Peer
::
send
(
const
RawBuffer
&
buffer
,
int
flags
)
{
return
transport
()
->
asyncWrite
(
fd_
,
buffer
,
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