Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
caddy
Commits
f8614b87
Commit
f8614b87
authored
Apr 21, 2017
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert
344017dc
(#1584)
parent
182e1b4f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
9 deletions
+1
-9
caddyhttp/proxy/proxy_test.go
caddyhttp/proxy/proxy_test.go
+0
-3
caddyhttp/proxy/reverseproxy.go
caddyhttp/proxy/reverseproxy.go
+1
-6
No files found.
caddyhttp/proxy/proxy_test.go
View file @
f8614b87
...
@@ -26,7 +26,6 @@ import (
...
@@ -26,7 +26,6 @@ import (
"github.com/mholt/caddy/caddyfile"
"github.com/mholt/caddy/caddyfile"
"github.com/mholt/caddy/caddyhttp/httpserver"
"github.com/mholt/caddy/caddyhttp/httpserver"
"github.com/mholt/caddy/caddyhttp/staticfiles"
"golang.org/x/net/websocket"
"golang.org/x/net/websocket"
)
)
...
@@ -995,8 +994,6 @@ func TestProxyDirectorURL(t *testing.T) {
...
@@ -995,8 +994,6 @@ func TestProxyDirectorURL(t *testing.T) {
t
.
Errorf
(
"case %d failed to create request: %s"
,
i
,
err
)
t
.
Errorf
(
"case %d failed to create request: %s"
,
i
,
err
)
continue
continue
}
}
req
=
req
.
WithContext
(
context
.
WithValue
(
req
.
Context
(),
staticfiles
.
URLPathCtxKey
,
c
.
originalPath
))
NewSingleHostReverseProxy
(
targetURL
,
c
.
without
,
0
)
.
Director
(
req
)
NewSingleHostReverseProxy
(
targetURL
,
c
.
without
,
0
)
.
Director
(
req
)
if
expect
,
got
:=
c
.
expectURL
,
req
.
URL
.
String
();
expect
!=
got
{
if
expect
,
got
:=
c
.
expectURL
,
req
.
URL
.
String
();
expect
!=
got
{
...
...
caddyhttp/proxy/reverseproxy.go
View file @
f8614b87
...
@@ -159,12 +159,7 @@ func NewSingleHostReverseProxy(target *url.URL, without string, keepalive int) *
...
@@ -159,12 +159,7 @@ func NewSingleHostReverseProxy(target *url.URL, without string, keepalive int) *
prefer
(
target
.
RawPath
,
target
.
Path
),
prefer
(
target
.
RawPath
,
target
.
Path
),
prefer
(
req
.
URL
.
RawPath
,
req
.
URL
.
Path
))
prefer
(
req
.
URL
.
RawPath
,
req
.
URL
.
Path
))
}
}
req
.
URL
.
Path
=
singleJoiningSlash
(
target
.
Path
,
req
.
URL
.
Path
=
singleJoiningSlash
(
target
.
Path
,
req
.
URL
.
Path
)
prefer
(
untouchedPath
,
req
.
URL
.
Path
))
// req.URL.Path must be consistent with decoded form of req.URL.RawPath if any
if
req
.
URL
.
RawPath
!=
""
&&
req
.
URL
.
RawPath
!=
req
.
URL
.
EscapedPath
()
{
panic
(
"RawPath doesn't match Path"
)
}
// Trims the path of the socket from the URL path.
// Trims the path of the socket from the URL path.
// This is done because req.URL passed to your proxied service
// This is done because req.URL passed to your proxied service
...
...
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