1
0
mirror of https://github.com/go-acme/lego.git synced 2024-11-28 17:41:10 +02:00
lego/acme
Alexander Neumann ec667a7ed1 Only try to parse JSON documents
This patch adds code to only parse the HTTP response body as JSON if the
content-type header advertises the content as JSON. In my case, the
directory server was unavailable: it returned a 503 HTTP response code
with an HTML document, and the only thing lego reported was:

    2016/04/04 19:12:56 Could not create client: get directory at 'https://acme-v01.api.letsencrypt.org/directory': invalid character '<' looking for beginning of value

This was caused by trying to parse the document body (HTML) as JSON,
without looking at the content-type header and returning the JSON parse
error.
2016-04-04 23:15:49 +02:00
..
challenges.go Use http client with timeout of 10s 2016-02-14 14:33:54 -07:00
client_test.go Remove keyBits from tests, use keyType instead. 2016-02-21 04:22:03 +01:00
client.go Add link to account to certificate meta data. 2016-03-14 03:29:29 +01:00
crypto_test.go Adapt tests to EC changes 2016-02-21 04:18:45 +01:00
crypto.go Merge pull request #130 from xenolf/add-ecc-support 2016-02-27 03:38:12 +01:00
dns_challenge_manual.go Use zone name when talking to DNS APIs 2016-03-21 00:18:49 +00:00
dns_challenge_test.go Move WaitFor into new utils.go and switch timeout and interval to time.Duration. 2016-03-11 03:52:46 +01:00
dns_challenge.go Use zone name when talking to DNS APIs 2016-03-21 00:18:49 +00:00
error.go Only try to parse JSON documents 2016-04-04 23:15:49 +02:00
http_challenge_server.go Move the HTTP-01 and TLS-SNI-01 default solvers to a more unified layout. 2016-02-14 16:56:14 +01:00
http_challenge_test.go Adapt tests to EC changes 2016-02-21 04:18:45 +01:00
http_challenge.go Add support for EC certificates / account keys 2016-02-21 04:18:45 +01:00
http_test.go Couple more tests to ensure right method is being used 2016-01-13 18:49:25 -07:00
http.go Use http client with timeout of 10s 2016-02-14 14:33:54 -07:00
jws.go Build with go-jose.v1 instead of master 2016-03-27 12:38:49 -07:00
messages.go Build with go-jose.v1 instead of master 2016-03-27 12:38:49 -07:00
pop_challenge.go Add remaining challenge types. 2015-06-11 00:11:58 +02:00
provider.go Add ChallengeProviderTimeout type to acme package 2016-03-16 18:17:03 +00:00
tls_sni_challenge_server.go Move the HTTP-01 and TLS-SNI-01 default solvers to a more unified layout. 2016-02-14 16:56:14 +01:00
tls_sni_challenge_test.go Adapt tests to EC changes 2016-02-21 04:18:45 +01:00
tls_sni_challenge.go Add support for EC certificates / account keys 2016-02-21 04:18:45 +01:00
utils_test.go Fix WaitFor calls 2016-03-11 04:52:59 +01:00
utils.go Fix WaitFor calls 2016-03-11 04:52:59 +01:00