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
39e55072
Commit
39e55072
authored
Jul 08, 2016
by
Pedro Nasser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix rewrite if problem (skip remaining args)
parent
88a2811e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
caddyhttp/rewrite/setup.go
caddyhttp/rewrite/setup.go
+1
-0
caddyhttp/rewrite/setup_test.go
caddyhttp/rewrite/setup_test.go
+6
-0
No files found.
caddyhttp/rewrite/setup.go
View file @
39e55072
...
@@ -92,6 +92,7 @@ func rewriteParse(c *caddy.Controller) ([]Rule, error) {
...
@@ -92,6 +92,7 @@ func rewriteParse(c *caddy.Controller) ([]Rule, error) {
}
}
default
:
default
:
if
httpserver
.
IfMatcherKeyword
(
c
.
Val
())
{
if
httpserver
.
IfMatcherKeyword
(
c
.
Val
())
{
c
.
RemainingArgs
()
continue
block
continue
block
}
}
return
nil
,
c
.
ArgErr
()
return
nil
,
c
.
ArgErr
()
...
...
caddyhttp/rewrite/setup_test.go
View file @
39e55072
...
@@ -179,6 +179,12 @@ func TestRewriteParse(t *testing.T) {
...
@@ -179,6 +179,12 @@ func TestRewriteParse(t *testing.T) {
}`
,
true
,
[]
Rule
{
}`
,
true
,
[]
Rule
{
&
ComplexRule
{},
&
ComplexRule
{},
}},
}},
{
`rewrite {
if {path} match /
to /to
}`
,
false
,
[]
Rule
{
&
ComplexRule
{
Base
:
"/"
,
To
:
"/to"
},
}},
}
}
for
i
,
test
:=
range
regexpTests
{
for
i
,
test
:=
range
regexpTests
{
...
...
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