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
545f24bc
Commit
545f24bc
authored
Jan 26, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove nghttp2_on_frame_recv_parse_error_callback
parent
6e612703
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1 addition
and
114 deletions
+1
-114
lib/includes/nghttp2/nghttp2.h
lib/includes/nghttp2/nghttp2.h
+1
-37
src/HttpServer.cc
src/HttpServer.cc
+0
-2
src/app_helper.cc
src/app_helper.cc
+0
-21
src/app_helper.h
src/app_helper.h
+0
-9
src/nghttp.cc
src/nghttp.cc
+0
-2
src/shrpx_http2_session.cc
src/shrpx_http2_session.cc
+0
-22
src/shrpx_http2_upstream.cc
src/shrpx_http2_upstream.cc
+0
-21
No files found.
lib/includes/nghttp2/nghttp2.h
View file @
545f24bc
...
...
@@ -1072,33 +1072,6 @@ typedef int (*nghttp2_on_stream_close_callback)
typedef
int
(
*
nghttp2_on_request_recv_callback
)
(
nghttp2_session
*
session
,
int32_t
stream_id
,
void
*
user_data
);
/**
* @functypedef
*
* Callback function invoked when the received control frame octets
* could not be parsed correctly. The |type| indicates the type of
* received non-DATA frame. The |head| is the pointer to the header of
* the received frame. The |headlen| is the length of the
* |head|. According to the spec, the |headlen| is always 8. In other
* words, the |head| is the first 8 bytes of the received frame. The
* |payload| is the pointer to the data portion of the received frame.
* The |payloadlen| is the length of the |payload|. This is the data
* after the length field. The |lib_error_code| is one of the error
* code defined in :enum:`nghttp2_error` and indicates the error. The
* |user_data| pointer is the third argument passed in to the call to
* `nghttp2_session_client_new()` or `nghttp2_session_server_new()`.
*
* The implementation of this function must return 0 if it
* succeeds. If nonzero is returned, it is treated as fatal error and
* `nghttp2_session_recv()` and `nghttp2_session_send()` functions
* immediately return :enum:`NGHTTP2_ERR_CALLBACK_FAILURE`.
*/
typedef
int
(
*
nghttp2_on_frame_recv_parse_error_callback
)
(
nghttp2_session
*
session
,
nghttp2_frame_type
type
,
const
uint8_t
*
head
,
size_t
headlen
,
const
uint8_t
*
payload
,
size_t
payloadlen
,
int
lib_error_code
,
void
*
user_data
);
/**
* @functypedef
*
...
...
@@ -1247,12 +1220,6 @@ typedef struct {
* received.
*/
nghttp2_on_request_recv_callback
on_request_recv_callback
;
/**
* Callback function invoked when the received non-DATA frame octets
* could not be parsed correctly.
*/
nghttp2_on_frame_recv_parse_error_callback
on_frame_recv_parse_error_callback
;
/**
* Callback function invoked when the received frame type is
* unknown.
...
...
@@ -1536,10 +1503,7 @@ int nghttp2_session_send(nghttp2_session *session);
* invalid,
* :member:`nghttp2_session_callbacks.on_invalid_frame_recv_callback`
* is invoked.
* 4. If the received frame could not be unpacked correctly,
* :member:`nghttp2_session_callbacks.on_frame_recv_parse_error_callback`
* is invoked.
* 5. If the received frame type is unknown,
* 4. If the received frame type is unknown,
* :member:`nghttp2_session_callbacks.on_unknown_frame_recv_callback`
* is invoked.
*
...
...
src/HttpServer.cc
View file @
545f24bc
...
...
@@ -1002,8 +1002,6 @@ void fill_callback(nghttp2_session_callbacks& callbacks, const Config *config)
if
(
config
->
verbose
)
{
callbacks
.
on_invalid_frame_recv_callback
=
verbose_on_invalid_frame_recv_callback
;
callbacks
.
on_frame_recv_parse_error_callback
=
verbose_on_frame_recv_parse_error_callback
;
callbacks
.
on_unknown_frame_recv_callback
=
verbose_on_unknown_frame_recv_callback
;
}
...
...
src/app_helper.cc
View file @
545f24bc
...
...
@@ -387,27 +387,6 @@ void dump_header(const uint8_t *head, size_t headlen)
}
}
// namespace
int
verbose_on_frame_recv_parse_error_callback
(
nghttp2_session
*
session
,
nghttp2_frame_type
type
,
const
uint8_t
*
head
,
size_t
headlen
,
const
uint8_t
*
payload
,
size_t
payloadlen
,
int
error_code
,
void
*
user_data
)
{
print_timer
();
printf
(
" [PARSE_ERROR] recv %s%s%s frame
\n
"
,
frame_name_ansi_esc
(
PRINT_RECV
),
strframetype
(
type
),
ansi_escend
());
print_frame_attr_indent
();
printf
(
"Error: %s
\n
"
,
nghttp2_strerror
(
error_code
));
dump_header
(
head
,
headlen
);
fflush
(
stdout
);
return
0
;
}
int
verbose_on_unknown_frame_recv_callback
(
nghttp2_session
*
session
,
const
uint8_t
*
head
,
size_t
headlen
,
...
...
src/app_helper.h
View file @
545f24bc
...
...
@@ -52,15 +52,6 @@ int verbose_on_invalid_frame_recv_callback
(
nghttp2_session
*
session
,
const
nghttp2_frame
*
frame
,
nghttp2_error_code
error_code
,
void
*
user_data
);
int
verbose_on_frame_recv_parse_error_callback
(
nghttp2_session
*
session
,
nghttp2_frame_type
type
,
const
uint8_t
*
head
,
size_t
headlen
,
const
uint8_t
*
payload
,
size_t
payloadlen
,
int
error_code
,
void
*
user_data
);
int
verbose_on_unknown_frame_recv_callback
(
nghttp2_session
*
session
,
const
uint8_t
*
head
,
size_t
headlen
,
...
...
src/nghttp.cc
View file @
545f24bc
...
...
@@ -1589,8 +1589,6 @@ int run(char **uris, int n)
callbacks
.
on_data_send_callback
=
verbose_on_data_send_callback
;
callbacks
.
on_invalid_frame_recv_callback
=
verbose_on_invalid_frame_recv_callback
;
callbacks
.
on_frame_recv_parse_error_callback
=
verbose_on_frame_recv_parse_error_callback
;
callbacks
.
on_unknown_frame_recv_callback
=
verbose_on_unknown_frame_recv_callback
;
}
...
...
src/shrpx_http2_session.cc
View file @
545f24bc
...
...
@@ -1130,26 +1130,6 @@ int on_frame_not_send_callback(nghttp2_session *session,
}
}
// namespace
namespace
{
int
on_frame_recv_parse_error_callback
(
nghttp2_session
*
session
,
nghttp2_frame_type
type
,
const
uint8_t
*
head
,
size_t
headlen
,
const
uint8_t
*
payload
,
size_t
payloadlen
,
int
lib_error_code
,
void
*
user_data
)
{
auto
http2session
=
static_cast
<
Http2Session
*>
(
user_data
);
if
(
LOG_ENABLED
(
INFO
))
{
SSLOG
(
INFO
,
http2session
)
<<
"Failed to parse received control frame. type="
<<
type
<<
", lib_error_code="
<<
lib_error_code
<<
":"
<<
nghttp2_strerror
(
lib_error_code
);
}
return
0
;
}
}
// namespace
namespace
{
int
on_unknown_frame_recv_callback
(
nghttp2_session
*
session
,
const
uint8_t
*
head
,
size_t
headlen
,
...
...
@@ -1203,8 +1183,6 @@ int Http2Session::on_connect()
callbacks
.
before_frame_send_callback
=
before_frame_send_callback
;
callbacks
.
on_frame_send_callback
=
on_frame_send_callback
;
callbacks
.
on_frame_not_send_callback
=
on_frame_not_send_callback
;
callbacks
.
on_frame_recv_parse_error_callback
=
on_frame_recv_parse_error_callback
;
callbacks
.
on_unknown_frame_recv_callback
=
on_unknown_frame_recv_callback
;
callbacks
.
on_header_callback
=
on_header_callback
;
callbacks
.
on_end_headers_callback
=
on_end_headers_callback
;
...
...
src/shrpx_http2_upstream.cc
View file @
545f24bc
...
...
@@ -456,25 +456,6 @@ int on_frame_not_send_callback(nghttp2_session *session,
}
}
// namespace
namespace
{
int
on_frame_recv_parse_error_callback
(
nghttp2_session
*
session
,
nghttp2_frame_type
type
,
const
uint8_t
*
head
,
size_t
headlen
,
const
uint8_t
*
payload
,
size_t
payloadlen
,
int
lib_error_code
,
void
*
user_data
)
{
auto
upstream
=
static_cast
<
Http2Upstream
*>
(
user_data
);
if
(
LOG_ENABLED
(
INFO
))
{
ULOG
(
INFO
,
upstream
)
<<
"Failed to parse received control frame. type="
<<
type
<<
", error_code="
<<
lib_error_code
<<
":"
<<
nghttp2_strerror
(
lib_error_code
);
}
return
0
;
}
}
// namespace
namespace
{
int
on_unknown_frame_recv_callback
(
nghttp2_session
*
session
,
const
uint8_t
*
head
,
size_t
headlen
,
...
...
@@ -520,8 +501,6 @@ Http2Upstream::Http2Upstream(ClientHandler *handler)
callbacks
.
on_data_recv_callback
=
on_data_recv_callback
;
callbacks
.
on_frame_send_callback
=
on_frame_send_callback
;
callbacks
.
on_frame_not_send_callback
=
on_frame_not_send_callback
;
callbacks
.
on_frame_recv_parse_error_callback
=
on_frame_recv_parse_error_callback
;
callbacks
.
on_unknown_frame_recv_callback
=
on_unknown_frame_recv_callback
;
callbacks
.
on_header_callback
=
on_header_callback
;
callbacks
.
on_end_headers_callback
=
on_end_headers_callback
;
...
...
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