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
2fa6e278
Commit
2fa6e278
authored
Jul 18, 2015
by
Maxime
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/mholt/caddy
parents
f536bc94
a74b20f2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
15 deletions
+25
-15
app/app.go
app/app.go
+1
-1
dist/CHANGES.txt
dist/CHANGES.txt
+5
-4
dist/README.txt
dist/README.txt
+1
-1
dist/automate.sh
dist/automate.sh
+17
-8
middleware/redirect/redirect.go
middleware/redirect/redirect.go
+1
-1
No files found.
app/app.go
View file @
2fa6e278
...
...
@@ -20,7 +20,7 @@ const (
Name
=
"Caddy"
// Version is the program version
Version
=
"0.7.
2
"
Version
=
"0.7.
3
"
)
var
(
...
...
dist/CHANGES.txt
View file @
2fa6e278
CHANGES
<master>
- errors: Error log now
include
s timestamp with each entry
- gzip:
Default filtering is by extension (fixes bug)
; removed MIME type filter
0.7.3 (July 15, 2015)
- errors: Error log now
show
s timestamp with each entry
- gzip:
Fixed; Default filtering is by extension
; removed MIME type filter
- import: Fixed; works inside and outside server blocks
- templates: Restricted or missing files result in proper 403 or 404 error
- redir: Query string preserved on catch-all redirects
- templates: Proper 403 or 404 errors for restricted or missing files
0.7.2 (July 1, 2015)
...
...
dist/README.txt
View file @
2fa6e278
CADDY 0.7.
2
CADDY 0.7.
3
Website
https://caddyserver.com
...
...
dist/automate.sh
View file @
2fa6e278
...
...
@@ -19,28 +19,37 @@ ReleaseDir=$DistDir/release
# Compile binaries
mkdir
-p
$BuildDir
cd
$BuildDir
rm
-f
*
rm
-f
caddy
*
gox
$Package
# Zip them up with release notes and stuff
mkdir
-p
$ReleaseDir
cd
$ReleaseDir
rm
-f
*
rm
-f
caddy
*
for
f
in
$BuildDir
/
*
do
# Name .zip file same as binary, but strip .exe from end
zipname
=
$(
basename
${
f
%
".exe"
}
)
.zip
zipname
=
$(
basename
${
f
%
".exe"
}
)
if
[[
$f
==
*
"linux"
*
]]
||
[[
$f
==
*
"bsd"
*
]]
;
then
zipname
=
${
zipname
}
.tar.gz
else
zipname
=
${
zipname
}
.zip
fi
# Binary inside the zip file is simply the project name
bin
=
$BuildDir
/
$(
basename
$Package
)
if
[[
$f
==
*
.exe
]]
then
bin
=
$bin
.exe
binbase
=
$(
basename
$Package
)
if
[[
$f
==
*
.exe
]]
;
then
binbase
=
$binbase
.exe
fi
bin
=
$BuildDir
/
$binbase
mv
$f
$bin
# Compress distributable
zip
-j
$zipname
$bin
$DistDir
/CHANGES.txt
$DistDir
/LICENSES.txt
$DistDir
/README.txt
if
[[
$zipname
==
*
.zip
]]
;
then
zip
-j
$zipname
$bin
$DistDir
/CHANGES.txt
$DistDir
/LICENSES.txt
$DistDir
/README.txt
else
tar
-cvzf
$zipname
-C
$BuildDir
$binbase
-C
$DistDir
CHANGES.txt LICENSES.txt README.txt
fi
# Put binary filename back to original
mv
$bin
$f
...
...
middleware/redirect/redirect.go
View file @
2fa6e278
...
...
@@ -23,7 +23,7 @@ type Redirect struct {
func
(
rd
Redirect
)
ServeHTTP
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
(
int
,
error
)
{
for
_
,
rule
:=
range
rd
.
Rules
{
if
rule
.
From
==
"/"
{
// Catchall redirect preserves path
(TODO: Standardize/formalize this behavior)
// Catchall redirect preserves path
and query string
toURL
,
err
:=
url
.
Parse
(
rule
.
To
)
if
err
!=
nil
{
return
http
.
StatusInternalServerError
,
err
...
...
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