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
98add63c
Commit
98add63c
authored
Mar 13, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttp: Treat stream as success if we see END_STREAM from peer
parent
7b904040
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
src/nghttp.cc
src/nghttp.cc
+6
-5
src/nghttp.h
src/nghttp.h
+3
-0
No files found.
src/nghttp.cc
View file @
98add63c
...
@@ -450,7 +450,7 @@ HttpClient::HttpClient(const nghttp2_session_callbacks *callbacks,
...
@@ -450,7 +450,7 @@ HttpClient::HttpClient(const nghttp2_session_callbacks *callbacks,
struct
ev_loop
*
loop
,
SSL_CTX
*
ssl_ctx
)
struct
ev_loop
*
loop
,
SSL_CTX
*
ssl_ctx
)
:
session
(
nullptr
),
callbacks
(
callbacks
),
loop
(
loop
),
ssl_ctx
(
ssl_ctx
),
:
session
(
nullptr
),
callbacks
(
callbacks
),
loop
(
loop
),
ssl_ctx
(
ssl_ctx
),
ssl
(
nullptr
),
addrs
(
nullptr
),
next_addr
(
nullptr
),
cur_addr
(
nullptr
),
ssl
(
nullptr
),
addrs
(
nullptr
),
next_addr
(
nullptr
),
cur_addr
(
nullptr
),
complete
(
0
),
settings_payloadlen
(
0
),
state
(
ClientState
::
IDLE
),
complete
(
0
),
s
uccess
(
0
),
s
ettings_payloadlen
(
0
),
state
(
ClientState
::
IDLE
),
upgrade_response_status_code
(
0
),
fd
(
-
1
),
upgrade_response_status_code
(
0
),
fd
(
-
1
),
upgrade_response_complete
(
false
)
{
upgrade_response_complete
(
false
)
{
ev_io_init
(
&
wev
,
writecb
,
0
,
EV_WRITE
);
ev_io_init
(
&
wev
,
writecb
,
0
,
EV_WRITE
);
...
@@ -1744,6 +1744,7 @@ int on_frame_recv_callback2(nghttp2_session *session,
...
@@ -1744,6 +1744,7 @@ int on_frame_recv_callback2(nghttp2_session *session,
if
(
frame
->
hd
.
flags
&
NGHTTP2_FLAG_END_STREAM
)
{
if
(
frame
->
hd
.
flags
&
NGHTTP2_FLAG_END_STREAM
)
{
req
->
record_response_end_time
();
req
->
record_response_end_time
();
++
client
->
success
;
}
}
break
;
break
;
...
@@ -1780,6 +1781,7 @@ int on_frame_recv_callback2(nghttp2_session *session,
...
@@ -1780,6 +1781,7 @@ int on_frame_recv_callback2(nghttp2_session *session,
if
(
frame
->
hd
.
flags
&
NGHTTP2_FLAG_END_STREAM
)
{
if
(
frame
->
hd
.
flags
&
NGHTTP2_FLAG_END_STREAM
)
{
req
->
record_response_end_time
();
req
->
record_response_end_time
();
++
client
->
success
;
}
}
break
;
break
;
...
@@ -2101,10 +2103,9 @@ int communicate(
...
@@ -2101,10 +2103,9 @@ int communicate(
}
}
#endif // HAVE_JANSSON
#endif // HAVE_JANSSON
if
(
!
client
.
all_requests_processed
())
{
if
(
client
.
success
!=
client
.
reqvec
.
size
())
{
std
::
cerr
<<
"Some requests were not processed. total="
std
::
cerr
<<
"Some requests failed. total="
<<
client
.
reqvec
.
size
()
<<
client
.
reqvec
.
size
()
<<
", processed="
<<
client
.
complete
<<
", success="
<<
client
.
success
<<
std
::
endl
;
<<
std
::
endl
;
}
}
if
(
config
.
stat
)
{
if
(
config
.
stat
)
{
print_stats
(
client
);
print_stats
(
client
);
...
...
src/nghttp.h
View file @
98add63c
...
@@ -259,6 +259,9 @@ struct HttpClient {
...
@@ -259,6 +259,9 @@ struct HttpClient {
addrinfo
*
cur_addr
;
addrinfo
*
cur_addr
;
// The number of completed requests, including failed ones.
// The number of completed requests, including failed ones.
size_t
complete
;
size_t
complete
;
// The number of requests that local endpoint received END_STREAM
// from peer.
size_t
success
;
// The length of settings_payload
// The length of settings_payload
size_t
settings_payloadlen
;
size_t
settings_payloadlen
;
ClientState
state
;
ClientState
state
;
...
...
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