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
b78662e5
Commit
b78662e5
authored
Aug 09, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
integration: Fix errors related to host-rewrite
parent
8a7bc6f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
integration-tests/nghttpx_http1_test.go
integration-tests/nghttpx_http1_test.go
+3
-3
integration-tests/nghttpx_http2_test.go
integration-tests/nghttpx_http2_test.go
+4
-4
No files found.
integration-tests/nghttpx_http1_test.go
View file @
b78662e5
...
...
@@ -164,7 +164,7 @@ func TestH1H1GracefulShutdown(t *testing.T) {
// TestH1H1HostRewrite tests that server rewrites Host header field
func
TestH1H1HostRewrite
(
t
*
testing
.
T
)
{
st
:=
newServerTester
(
nil
,
t
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
st
:=
newServerTester
(
[]
string
{
"--host-rewrite"
}
,
t
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
w
.
Header
()
.
Add
(
"request-host"
,
r
.
Host
)
})
defer
st
.
Close
()
...
...
@@ -212,7 +212,7 @@ func TestH1H1HTTP10(t *testing.T) {
// field using actual backend server even if --no-http-rewrite is
// used.
func
TestH1H1HTTP10NoHostRewrite
(
t
*
testing
.
T
)
{
st
:=
newServerTester
(
[]
string
{
"--no-host-rewrite"
}
,
t
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
st
:=
newServerTester
(
nil
,
t
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
w
.
Header
()
.
Add
(
"request-host"
,
r
.
Host
)
})
defer
st
.
Close
()
...
...
@@ -429,7 +429,7 @@ func TestH1H2HTTP10(t *testing.T) {
// field using actual backend server even if --no-http-rewrite is
// used.
func
TestH1H2HTTP10NoHostRewrite
(
t
*
testing
.
T
)
{
st
:=
newServerTester
([]
string
{
"--http2-bridge"
,
"--no-host-rewrite"
},
t
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
st
:=
newServerTester
([]
string
{
"--http2-bridge"
},
t
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
w
.
Header
()
.
Add
(
"request-host"
,
r
.
Host
)
})
defer
st
.
Close
()
...
...
integration-tests/nghttpx_http2_test.go
View file @
b78662e5
...
...
@@ -195,7 +195,7 @@ func TestH2H1NoVia(t *testing.T) {
// TestH2H1HostRewrite tests that server rewrites host header field
func
TestH2H1HostRewrite
(
t
*
testing
.
T
)
{
st
:=
newServerTester
(
nil
,
t
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
st
:=
newServerTester
(
[]
string
{
"--host-rewrite"
}
,
t
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
w
.
Header
()
.
Add
(
"request-host"
,
r
.
Host
)
})
defer
st
.
Close
()
...
...
@@ -217,7 +217,7 @@ func TestH2H1HostRewrite(t *testing.T) {
// TestH2H1NoHostRewrite tests that server does not rewrite host
// header field
func
TestH2H1NoHostRewrite
(
t
*
testing
.
T
)
{
st
:=
newServerTester
(
[]
string
{
"--no-host-rewrite"
}
,
t
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
st
:=
newServerTester
(
nil
,
t
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
w
.
Header
()
.
Add
(
"request-host"
,
r
.
Host
)
})
defer
st
.
Close
()
...
...
@@ -813,7 +813,7 @@ func TestH2H2ConnectFailure(t *testing.T) {
// TestH2H2HostRewrite tests that server rewrites host header field
func
TestH2H2HostRewrite
(
t
*
testing
.
T
)
{
st
:=
newServerTester
([]
string
{
"--http2-bridge"
},
t
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
st
:=
newServerTester
([]
string
{
"--http2-bridge"
,
"--host-rewrite"
},
t
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
w
.
Header
()
.
Add
(
"request-host"
,
r
.
Host
)
})
defer
st
.
Close
()
...
...
@@ -835,7 +835,7 @@ func TestH2H2HostRewrite(t *testing.T) {
// TestH2H2NoHostRewrite tests that server does not rewrite host
// header field
func
TestH2H2NoHostRewrite
(
t
*
testing
.
T
)
{
st
:=
newServerTester
([]
string
{
"--http2-bridge"
,
"--no-host-rewrite"
},
t
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
st
:=
newServerTester
([]
string
{
"--http2-bridge"
},
t
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
w
.
Header
()
.
Add
(
"request-host"
,
r
.
Host
)
})
defer
st
.
Close
()
...
...
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