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
c0fc7269
Commit
c0fc7269
authored
Jan 21, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Call signal_write in HttpsUpstream::on_downstream_abort_request
parent
041d9863
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
integration-tests/nghttpx_test.go
integration-tests/nghttpx_test.go
+22
-0
src/shrpx_https_upstream.cc
src/shrpx_https_upstream.cc
+3
-1
No files found.
integration-tests/nghttpx_test.go
View file @
c0fc7269
...
...
@@ -95,6 +95,28 @@ func TestH1H1ConnectFailure(t *testing.T) {
}
}
func
TestH1H2NoHost
(
t
*
testing
.
T
)
{
st
:=
newServerTester
([]
string
{
"--http2-bridge"
},
t
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
t
.
Errorf
(
"server should not forward bad request"
)
})
defer
st
.
Close
()
// without Host header field, we expect 400 response
if
_
,
err
:=
io
.
WriteString
(
st
.
conn
,
"GET / HTTP/1.1
\r\n
Test-Case: TestH1H2NoHost
\r\n\r\n
"
);
err
!=
nil
{
t
.
Fatalf
(
"Error io.WriteString() = %v"
,
err
)
}
resp
,
err
:=
http
.
ReadResponse
(
bufio
.
NewReader
(
st
.
conn
),
nil
)
if
err
!=
nil
{
t
.
Fatalf
(
"Error http.ReadResponse() = %v"
,
err
)
}
want
:=
400
if
got
:=
resp
.
StatusCode
;
got
!=
want
{
t
.
Errorf
(
"status: %v; want %v"
,
got
,
want
)
}
}
func
TestH2H1PlainGET
(
t
*
testing
.
T
)
{
st
:=
newServerTester
(
nil
,
t
,
noopHandler
)
defer
st
.
Close
()
...
...
src/shrpx_https_upstream.cc
View file @
c0fc7269
...
...
@@ -810,7 +810,9 @@ int HttpsUpstream::on_downstream_body_complete(Downstream *downstream) {
int
HttpsUpstream
::
on_downstream_abort_request
(
Downstream
*
downstream
,
unsigned
int
status_code
)
{
handler_
->
set_should_close_after_write
(
true
);
return
error_reply
(
status_code
);
error_reply
(
status_code
);
handler_
->
signal_write
();
return
0
;
}
void
HttpsUpstream
::
log_response_headers
(
const
std
::
string
&
hdrs
)
const
{
...
...
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