Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
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
nghttp2
Commits
83d362c6
Commit
83d362c6
authored
Jun 25, 2019
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't read too greedily
parent
a76d0723
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
src/HttpServer.cc
src/HttpServer.cc
+2
-0
src/shrpx_client_handler.cc
src/shrpx_client_handler.cc
+7
-2
No files found.
src/HttpServer.cc
View file @
83d362c6
...
...
@@ -650,6 +650,7 @@ int Http2Handler::read_clear() {
}
return
-
1
;
}
break
;
}
return
write_
(
*
this
);
...
...
@@ -775,6 +776,7 @@ int Http2Handler::read_tls() {
}
return
-
1
;
}
break
;
}
fin:
...
...
src/shrpx_client_handler.cc
View file @
83d362c6
...
...
@@ -111,6 +111,7 @@ void writecb(struct ev_loop *loop, ev_io *w, int revents) {
int
ClientHandler
::
noop
()
{
return
0
;
}
int
ClientHandler
::
read_clear
()
{
auto
should_break
=
false
;
rb_
.
ensure_chunk
();
for
(;;)
{
if
(
rb_
.
rleft
()
&&
on_read
()
!=
0
)
{
...
...
@@ -123,7 +124,7 @@ int ClientHandler::read_clear() {
return
0
;
}
if
(
!
ev_is_active
(
&
conn_
.
rev
))
{
if
(
!
ev_is_active
(
&
conn_
.
rev
)
||
should_break
)
{
return
0
;
}
...
...
@@ -141,6 +142,7 @@ int ClientHandler::read_clear() {
}
rb_
.
write
(
nread
);
should_break
=
true
;
}
}
...
...
@@ -205,6 +207,8 @@ int ClientHandler::tls_handshake() {
}
int
ClientHandler
::
read_tls
()
{
auto
should_break
=
false
;
ERR_clear_error
();
rb_
.
ensure_chunk
();
...
...
@@ -221,7 +225,7 @@ int ClientHandler::read_tls() {
return
0
;
}
if
(
!
ev_is_active
(
&
conn_
.
rev
))
{
if
(
!
ev_is_active
(
&
conn_
.
rev
)
||
should_break
)
{
return
0
;
}
...
...
@@ -239,6 +243,7 @@ int ClientHandler::read_tls() {
}
rb_
.
write
(
nread
);
should_break
=
true
;
}
}
...
...
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