Add user agent for ACME

This commit is contained in:
Ludovic Fernandez 2018-06-05 09:54:03 +02:00 committed by Traefiker Bot
parent 6d07729c55
commit ae7c947ba5
6 changed files with 11 additions and 5 deletions

View file

@ -822,6 +822,7 @@ func validate(j *jws, domain, uri string, c challenge) error {
log.Printf("[INFO][%s] The server validated our request", domain)
return nil
case "pending":
case "processing":
case "invalid":
return handleChallengeError(chlng)
default:

View file

@ -155,6 +155,6 @@ func postJSON(j *jws, uri string, reqBody, respBody interface{}) (http.Header, e
// userAgent builds and returns the User-Agent string to use in requests.
func userAgent() string {
ua := fmt.Sprintf("%s (%s; %s) %s %s", defaultGoUserAgent, runtime.GOOS, runtime.GOARCH, ourUserAgent, UserAgent)
ua := fmt.Sprintf("%s %s (%s; %s) %s", UserAgent, ourUserAgent, runtime.GOOS, runtime.GOARCH, defaultGoUserAgent)
return strings.TrimSpace(ua)
}