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
nexedi
caddy
Commits
df6efe5d
Commit
df6efe5d
authored
May 09, 2015
by
Peter Hellberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
headers: Replaced usage of Url to Path in setup
parent
d9dc9326
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
config/setup/headers.go
config/setup/headers.go
+5
-5
No files found.
config/setup/headers.go
View file @
df6efe5d
...
...
@@ -29,17 +29,17 @@ func headersParse(c *Controller) ([]headers.Rule, error) {
}
pattern
:=
c
.
Val
()
// See if we already have a definition for this
URL
pattern...
// See if we already have a definition for this
Path
pattern...
for
_
,
h
:=
range
rules
{
if
h
.
Url
==
pattern
{
if
h
.
Path
==
pattern
{
head
=
h
break
}
}
// ...otherwise, this is a new pattern
if
head
.
Url
==
""
{
head
.
Url
=
pattern
if
head
.
Path
==
""
{
head
.
Path
=
pattern
isNewPattern
=
true
}
...
...
@@ -72,7 +72,7 @@ func headersParse(c *Controller) ([]headers.Rule, error) {
rules
=
append
(
rules
,
head
)
}
else
{
for
i
:=
0
;
i
<
len
(
rules
);
i
++
{
if
rules
[
i
]
.
Url
==
pattern
{
if
rules
[
i
]
.
Path
==
pattern
{
rules
[
i
]
=
head
break
}
...
...
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