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
9678daa4
Commit
9678daa4
authored
Feb 20, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Rename index_headers() as parse_content_length()
parent
23ecfd41
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
8 deletions
+7
-8
src/shrpx_downstream.cc
src/shrpx_downstream.cc
+1
-1
src/shrpx_downstream.h
src/shrpx_downstream.h
+3
-4
src/shrpx_http_downstream_connection.cc
src/shrpx_http_downstream_connection.cc
+1
-1
src/shrpx_https_upstream.cc
src/shrpx_https_upstream.cc
+1
-1
src/shrpx_spdy_upstream.cc
src/shrpx_spdy_upstream.cc
+1
-1
No files found.
src/shrpx_downstream.cc
View file @
9678daa4
...
...
@@ -367,7 +367,7 @@ void append_last_header_value(bool &key_prev, size_t &sum, Headers &headers,
}
}
// namespace
int
FieldStore
::
index_headers
()
{
int
FieldStore
::
parse_content_length
()
{
content_length
=
-
1
;
for
(
auto
&
kv
:
headers_
)
{
...
...
src/shrpx_downstream.h
View file @
9678daa4
...
...
@@ -89,10 +89,9 @@ public:
bool
header_key_prev
()
const
{
return
header_key_prev_
;
}
// Lower the header field names and indexes header fields. If there
// is any invalid headers (e.g., multiple Content-Length having
// different values), returns -1.
int
index_headers
();
// Parses content-length, and records it in the field. If there are
// multiple Content-Length, returns -1.
int
parse_content_length
();
// Empties headers.
void
clear_headers
();
...
...
src/shrpx_http_downstream_connection.cc
View file @
9678daa4
...
...
@@ -572,7 +572,7 @@ int htp_hdrs_completecb(http_parser *htp) {
resp
.
http_major
=
htp
->
http_major
;
resp
.
http_minor
=
htp
->
http_minor
;
if
(
resp
.
fs
.
index_headers
()
!=
0
)
{
if
(
resp
.
fs
.
parse_content_length
()
!=
0
)
{
downstream
->
set_response_state
(
Downstream
::
MSG_BAD_HEADER
);
return
-
1
;
}
...
...
src/shrpx_https_upstream.cc
View file @
9678daa4
...
...
@@ -270,7 +270,7 @@ int htp_hdrs_completecb(http_parser *htp) {
ULOG
(
INFO
,
upstream
)
<<
"HTTP request headers
\n
"
<<
ss
.
str
();
}
if
(
req
.
fs
.
index_headers
()
!=
0
)
{
if
(
req
.
fs
.
parse_content_length
()
!=
0
)
{
return
-
1
;
}
...
...
src/shrpx_spdy_upstream.cc
View file @
9678daa4
...
...
@@ -194,7 +194,7 @@ void on_ctrl_recv_callback(spdylay_session *session, spdylay_frame_type type,
req
.
fs
.
add_header_token
(
name
,
value
,
false
,
token
);
}
if
(
req
.
fs
.
index_headers
()
!=
0
)
{
if
(
req
.
fs
.
parse_content_length
()
!=
0
)
{
if
(
upstream
->
error_reply
(
downstream
,
400
)
!=
0
)
{
ULOG
(
FATAL
,
upstream
)
<<
"error_reply failed"
;
}
...
...
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