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
8e980f1a
Commit
8e980f1a
authored
Aug 30, 2016
by
Michael Burkat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
potential fixes to memory leak
parent
b60e1433
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
2 deletions
+15
-2
include/http.h
include/http.h
+7
-0
include/prototype.h
include/prototype.h
+1
-0
src/common/http_header.cc
src/common/http_header.cc
+6
-0
src/common/http_headers.cc
src/common/http_headers.cc
+0
-1
src/server/listener.cc
src/server/listener.cc
+1
-1
No files found.
include/http.h
View file @
8e980f1a
...
...
@@ -75,6 +75,8 @@ public:
Message
(
Message
&&
other
)
=
default
;
Message
&
operator
=
(
Message
&&
other
)
=
default
;
virtual
~
Message
()
{}
protected:
Version
version_
;
Code
code_
;
...
...
@@ -150,12 +152,14 @@ private:
Request
();
#ifdef LIBSTDCPP_SMARTPTR_LOCK_FIXME
public:
void
associatePeer
(
const
std
::
shared_ptr
<
Tcp
::
Peer
>&
peer
)
{
if
(
peer_
.
use_count
()
>
0
)
throw
std
::
runtime_error
(
"A peer was already associated to the response"
);
peer_
=
peer
;
}
private:
#endif
Method
method_
;
...
...
@@ -576,6 +580,7 @@ namespace Private {
Step
(
Message
*
request
)
:
message
(
request
)
{
}
virtual
~
Step
()
{}
virtual
State
apply
(
StreamCursor
&
cursor
)
=
0
;
...
...
@@ -663,6 +668,8 @@ namespace Private {
ParserBase
(
const
ParserBase
&
other
)
=
delete
;
ParserBase
(
ParserBase
&&
other
)
=
default
;
virtual
~
ParserBase
()
{}
bool
feed
(
const
char
*
data
,
size_t
len
);
virtual
void
reset
();
...
...
include/prototype.h
View file @
8e980f1a
...
...
@@ -12,6 +12,7 @@
/* In a sense, a Prototype is just a class that provides a clone() method */
template
<
typename
Class
>
struct
Prototype
{
virtual
~
Prototype
()
{}
virtual
std
::
shared_ptr
<
Class
>
clone
()
const
=
0
;
};
...
...
src/common/http_header.cc
View file @
8e980f1a
...
...
@@ -417,6 +417,12 @@ Accept::parseRaw(const char *str, size_t len) {
void
Accept
::
write
(
std
::
ostream
&
os
)
const
{
for
(
size_t
i
=
0
;
i
<
mediaRange_
.
size
();
i
++
)
{
os
<<
mediaRange_
[
i
].
toString
();
if
(
i
!=
mediaRange_
.
size
()
-
1
)
{
os
<<
","
;
}
}
}
void
...
...
src/common/http_headers.cc
View file @
8e980f1a
...
...
@@ -77,7 +77,6 @@ Registry::isRegistered(const std::string& name) {
Collection
&
Collection
::
add
(
const
std
::
shared_ptr
<
Header
>&
header
)
{
headers
.
insert
(
std
::
make_pair
(
header
->
name
(),
header
));
return
*
this
;
}
...
...
src/server/listener.cc
View file @
8e980f1a
...
...
@@ -210,7 +210,7 @@ Listener::run() {
int
ready_fds
=
poller
.
poll
(
events
,
128
,
std
::
chrono
::
milliseconds
(
-
1
));
if
(
ready_fds
==
-
1
)
{
if
(
errno
==
EINTR
&&
g_listen_fd
==
-
1
)
return
;
if
(
errno
==
EINTR
)
continue
;
throw
Error
::
system
(
"Polling"
);
}
else
if
(
ready_fds
>
0
)
{
...
...
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