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
22766433
Commit
22766433
authored
Jul 02, 2016
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Misc. changes: {hostonly} placeholder, self_signed port fix
parent
32329a47
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
caddy.go
caddy.go
+1
-1
caddy/build.bash
caddy/build.bash
+1
-1
caddyhttp/httpserver/plugin.go
caddyhttp/httpserver/plugin.go
+1
-1
caddyhttp/httpserver/replacer.go
caddyhttp/httpserver/replacer.go
+8
-1
No files found.
caddy.go
View file @
22766433
...
...
@@ -93,7 +93,7 @@ func (i *Instance) Stop() error {
}
}
// splice i
nstance list to delete this one
// splice i
out of instance list, causing it to be garbage-collected
instancesMu
.
Lock
()
for
j
,
other
:=
range
instances
{
if
other
==
i
{
...
...
caddy/build.bash
View file @
22766433
...
...
@@ -13,7 +13,7 @@
set
-euo
pipefail
:
${
output_filename
:
=
"
${
1
:-}
"
}
:
${
output_filename
:
=
"
caddy
"
}
:
${
output_filename
:
=
""
}
:
${
git_repo
:
=
"
${
2
:-}
"
}
:
${
git_repo
:
=
"."
}
...
...
caddyhttp/httpserver/plugin.go
View file @
22766433
...
...
@@ -138,7 +138,7 @@ func (h *httpContext) MakeServers() ([]caddy.Server, error) {
// is incorrect for this site.
cfg
.
Addr
.
Scheme
=
"https"
}
if
cfg
.
Addr
.
Port
==
""
&&
(
!
cfg
.
TLS
.
Manual
||
cfg
.
TLS
.
OnDemand
)
{
if
cfg
.
Addr
.
Port
==
""
&&
(
(
!
cfg
.
TLS
.
Manual
&&
!
cfg
.
TLS
.
SelfSigned
)
||
cfg
.
TLS
.
OnDemand
)
{
// this is vital, otherwise the function call below that
// sets the listener address will use the default port
// instead of 443 because it doesn't know about TLS.
...
...
caddyhttp/httpserver/replacer.go
View file @
22766433
...
...
@@ -69,7 +69,14 @@ func NewReplacer(r *http.Request, rr *ResponseRecorder, emptyValue string) Repla
}
return
name
}(),
"{host}"
:
r
.
Host
,
"{host}"
:
r
.
Host
,
"{hostonly}"
:
func
()
string
{
host
,
_
,
err
:=
net
.
SplitHostPort
(
r
.
Host
)
if
err
!=
nil
{
return
r
.
Host
}
return
host
}(),
"{path}"
:
r
.
URL
.
Path
,
"{path_escaped}"
:
url
.
QueryEscape
(
r
.
URL
.
Path
),
"{query}"
:
r
.
URL
.
RawQuery
,
...
...
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