forked from caddyserver/caddy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
caddyfile: Do not replace import tokens if they are part of a snippet (…
…caddyserver#5539) * fix variadic placeholder in imported file which also imports * fix tests. * skip replacing args when imported token may be part of a snippet
- Loading branch information
Showing
5 changed files
with
99 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(t2) { | ||
respond 200 { | ||
body {args[:]} | ||
} | ||
} | ||
|
||
:8082 { | ||
import t2 false | ||
} |
9 changes: 9 additions & 0 deletions
9
caddyconfig/httpcaddyfile/testdata/import_variadic_snippet.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(t1) { | ||
respond 200 { | ||
body {args[:]} | ||
} | ||
} | ||
|
||
:8081 { | ||
import t1 false | ||
} |
15 changes: 15 additions & 0 deletions
15
caddyconfig/httpcaddyfile/testdata/import_variadic_with_import.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
(t1) { | ||
respond 200 { | ||
body {args[:]} | ||
} | ||
} | ||
|
||
:8081 { | ||
import t1 false | ||
} | ||
|
||
import import_variadic.txt | ||
|
||
:8083 { | ||
import t2 true | ||
} |