diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-06-17 13:29:06 +0200 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-06-18 14:29:19 +0200 |
commit | 47bb597b4fd6fd7b581fe405f71b797243fe96db (patch) | |
tree | 745c6928f72e9d61022fdf6dae32b528ce7fcc1c /crypto/http | |
parent | 765860a3cef75b90452c67c4ed63ab17e5d1b862 (diff) |
http_client.c: fix HTTP_VERSION_STR_LEN and make it more efficient
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15796)
Diffstat (limited to 'crypto/http')
-rw-r--r-- | crypto/http/http_client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/http/http_client.c b/crypto/http/http_client.c index 1652a2c9a0..aea53b302b 100644 --- a/crypto/http/http_client.c +++ b/crypto/http/http_client.c @@ -26,9 +26,9 @@ #define HAS_PREFIX(str, prefix) (strncmp(str, prefix, sizeof(prefix) - 1) == 0) #define HTTP_PREFIX "HTTP/" #define HTTP_VERSION_PATT "1." /* allow 1.x */ +#define HTTP_VERSION_STR_LEN sizeof(HTTP_VERSION_PATT) /* == strlen("1.0") */ #define HTTP_PREFIX_VERSION HTTP_PREFIX""HTTP_VERSION_PATT #define HTTP_1_0 HTTP_PREFIX_VERSION"0" /* "HTTP/1.0" */ -#define HTTP_VERSION_STR_LEN (strlen(HTTP_PREFIX_VERSION) + 1) #define HTTP_LINE1_MINLEN (sizeof(HTTP_PREFIX_VERSION "x 200\n") - 1) #define HTTP_VERSION_MAX_REDIRECTIONS 50 |