Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
cc7fdbd6
Commit
cc7fdbd6
authored
Jun 07, 2016
by
neil
Browse files
minor, remove the unnecessary error file
parent
199067e8
Changes
1
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
cc7fdbd6
...
@@ -587,9 +587,9 @@ _post() {
...
@@ -587,9 +587,9 @@ _post() {
_CURL
=
"
$CURL
--dump-header
$HTTP_HEADER
"
_CURL
=
"
$CURL
--dump-header
$HTTP_HEADER
"
_debug
"_CURL"
"
$_CURL
"
_debug
"_CURL"
"
$_CURL
"
if
[
"
$needbase64
"
]
;
then
if
[
"
$needbase64
"
]
;
then
response
=
"
$(
$_CURL
-A
"User-Agent:
$USER_AGENT
"
-X
$httpmethod
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
--data
"
$body
"
"
$url
"
2>
"
$HTTP_ERROR_FILE
"
| _base64
)
"
response
=
"
$(
$_CURL
-A
"User-Agent:
$USER_AGENT
"
-X
$httpmethod
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
--data
"
$body
"
"
$url
"
| _base64
)
"
else
else
response
=
"
$(
$_CURL
-A
"User-Agent:
$USER_AGENT
"
-X
$httpmethod
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
--data
"
$body
"
"
$url
"
2>
"
$HTTP_ERROR_FILE
"
)
"
response
=
"
$(
$_CURL
-A
"User-Agent:
$USER_AGENT
"
-X
$httpmethod
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
--data
"
$body
"
"
$url
"
)
"
fi
fi
_ret
=
"
$?
"
_ret
=
"
$?
"
else
else
...
@@ -611,9 +611,6 @@ _post() {
...
@@ -611,9 +611,6 @@ _post() {
_sed_i
"s/^ *//g"
"
$HTTP_HEADER
"
_sed_i
"s/^ *//g"
"
$HTTP_HEADER
"
fi
fi
_debug
"_ret"
"
$_ret
"
_debug
"_ret"
"
$_ret
"
if
[
"
$ret
"
!=
"0"
]
;
then
_err
"
$(
cat
"
$HTTP_ERROR_FILE
"
)
"
fi
printf
"%s"
"
$response
"
printf
"%s"
"
$response
"
return
$_ret
return
$_ret
}
}
...
@@ -627,9 +624,9 @@ _get() {
...
@@ -627,9 +624,9 @@ _get() {
if
_exists
"curl"
;
then
if
_exists
"curl"
;
then
_debug
"CURL"
"
$CURL
"
_debug
"CURL"
"
$CURL
"
if
[
"
$onlyheader
"
]
;
then
if
[
"
$onlyheader
"
]
;
then
$CURL
-I
-A
"User-Agent:
$USER_AGENT
"
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
$url
2>
"
$HTTP_ERROR_FILE
"
$CURL
-I
-A
"User-Agent:
$USER_AGENT
"
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
$url
else
else
$CURL
-A
"User-Agent:
$USER_AGENT
"
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
$url
2>
"
$HTTP_ERROR_FILE
"
$CURL
-A
"User-Agent:
$USER_AGENT
"
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
$url
fi
fi
ret
=
$?
ret
=
$?
else
else
...
@@ -637,14 +634,11 @@ _get() {
...
@@ -637,14 +634,11 @@ _get() {
if
[
"
$onlyheader
"
]
;
then
if
[
"
$onlyheader
"
]
;
then
$WGET
--user-agent
=
"
$USER_AGENT
"
--header
"
$_H4
"
--header
"
$_H3
"
--header
"
$_H2
"
--header
"
$_H1
"
-S
-O
/dev/null
$url
2>&1 |
sed
's/^[ ]*//g'
$WGET
--user-agent
=
"
$USER_AGENT
"
--header
"
$_H4
"
--header
"
$_H3
"
--header
"
$_H2
"
--header
"
$_H1
"
-S
-O
/dev/null
$url
2>&1 |
sed
's/^[ ]*//g'
else
else
$WGET
--user-agent
=
"
$USER_AGENT
"
--header
"
$_H4
"
--header
"
$_H3
"
--header
"
$_H2
"
--header
"
$_H1
"
-O
-
$url
2>
"
$HTTP_ERROR_FILE
"
$WGET
--user-agent
=
"
$USER_AGENT
"
--header
"
$_H4
"
--header
"
$_H3
"
--header
"
$_H2
"
--header
"
$_H1
"
-O
-
$url
fi
fi
ret
=
$?
ret
=
$?
fi
fi
_debug
"ret"
"
$ret
"
_debug
"ret"
"
$ret
"
if
[
"
$ret
"
!=
"0"
]
;
then
_err
"
$(
cat
"
$HTTP_ERROR_FILE
"
)
"
fi
return
$ret
return
$ret
}
}
...
@@ -881,7 +875,6 @@ _initpath() {
...
@@ -881,7 +875,6 @@ _initpath() {
fi
fi
HTTP_HEADER
=
"
$LE_WORKING_DIR
/http.header"
HTTP_HEADER
=
"
$LE_WORKING_DIR
/http.header"
HTTP_ERROR_FILE
=
"
$LE_WORKING_DIR
/http.err"
WGET
=
"wget -q"
WGET
=
"wget -q"
if
[
"
$DEBUG
"
]
&&
[
"
$DEBUG
"
-ge
"2"
]
;
then
if
[
"
$DEBUG
"
]
&&
[
"
$DEBUG
"
-ge
"2"
]
;
then
...
...
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