diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2019-07-12 15:01:34 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2019-07-12 15:01:34 +0000 |
commit | 11072c094ed5b0cac78906eda21012d84114c07d (patch) | |
tree | 9b09543f09e724a9f64f20002acc183ee46620bc | |
parent | 0ec66fa131c6bdeca66a7743567e0663670ce75c (diff) |
According to RFC 8555 we MUST send an User-Agent.
Pointed out and diff by Wolf, thanks!
Tweaked by me.
OK benno
-rw-r--r-- | usr.sbin/acme-client/http.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/acme-client/http.c b/usr.sbin/acme-client/http.c index 329773907ad..08731297d8f 100644 --- a/usr.sbin/acme-client/http.c +++ b/usr.sbin/acme-client/http.c @@ -1,4 +1,4 @@ -/* $Id: http.c,v 1.27 2019/06/28 13:32:46 deraadt Exp $ */ +/* $Id: http.c,v 1.28 2019/07/12 15:01:33 florian Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -344,12 +344,14 @@ http_open(const struct http *http, int headreq, const void *p, size_t psz) c = asprintf(&req, "HEAD %s HTTP/1.0\r\n" "Host: %s\r\n" + "User-Agent: OpenBSD-acme-client\r\n" "\r\n", http->path, http->host); else c = asprintf(&req, "GET %s HTTP/1.0\r\n" "Host: %s\r\n" + "User-Agent: OpenBSD-acme-client\r\n" "\r\n", http->path, http->host); } else { @@ -358,6 +360,7 @@ http_open(const struct http *http, int headreq, const void *p, size_t psz) "Host: %s\r\n" "Content-Length: %zu\r\n" "Content-Type: application/jose+json\r\n" + "User-Agent: OpenBSD-acme-client\r\n" "\r\n", http->path, http->host, psz); } |