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
72e4ba8b
Commit
72e4ba8b
authored
Aug 30, 2016
by
Matt Holt
Committed by
GitHub
Aug 30, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1079 from ijt/master
Use naoina/toml for MIT license. Make proxy_test work in any directory.
parents
ac933f16
19910833
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
caddyhttp/markdown/metadata/metadata_toml.go
caddyhttp/markdown/metadata/metadata_toml.go
+1
-1
caddyhttp/proxy/proxy_test.go
caddyhttp/proxy/proxy_test.go
+6
-4
No files found.
caddyhttp/markdown/metadata/metadata_toml.go
View file @
72e4ba8b
...
...
@@ -3,7 +3,7 @@ package metadata
import
(
"bytes"
"github.com/
BurntSushi
/toml"
"github.com/
naoina
/toml"
)
// TOMLParser is the Parser for TOML
...
...
caddyhttp/proxy/proxy_test.go
View file @
72e4ba8b
...
...
@@ -200,10 +200,11 @@ func TestUnixSocketProxy(t *testing.T) {
}))
// Get absolute path for unix: socket
socketPath
,
err
:=
filepath
.
Abs
(
"./test_socke
t"
)
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"caddy_tes
t"
)
if
err
!=
nil
{
t
.
Fatalf
(
"
Unable to get absolute path:
%v"
,
err
)
t
.
Fatalf
(
"
Failed to make temp dir to contain unix socket.
%v"
,
err
)
}
socketPath
:=
filepath
.
Join
(
dir
,
"test_socket"
)
// Change httptest.Server listener to listen to unix: socket
ln
,
err
:=
net
.
Listen
(
"unix"
,
socketPath
)
...
...
@@ -258,10 +259,11 @@ func GetSocketProxy(messageFormat string, prefix string) (*Proxy, *httptest.Serv
fmt
.
Fprintf
(
w
,
messageFormat
,
r
.
URL
.
String
())
}))
socketPath
,
err
:=
filepath
.
Abs
(
"./test_socke
t"
)
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"caddy_tes
t"
)
if
err
!=
nil
{
return
nil
,
nil
,
fmt
.
Errorf
(
"
Unable to get absolute path:
%v"
,
err
)
return
nil
,
nil
,
fmt
.
Errorf
(
"
Failed to make temp dir to contain unix socket.
%v"
,
err
)
}
socketPath
:=
filepath
.
Join
(
dir
,
"test_socket"
)
ln
,
err
:=
net
.
Listen
(
"unix"
,
socketPath
)
if
err
!=
nil
{
...
...
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