diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-08-13 12:12:14 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-08-13 23:16:01 +0200 |
commit | 8440616f53056b2330393d1b0740c89a30376c67 (patch) | |
tree | ea2ea2300488f3c792ff7cf2a86e5047a3814e2f /lib/curl_setup.h | |
parent | 233908a55aa041d1ad3d901f9c3b8e3b1ebd3d55 (diff) |
http: fix for tiny "HTTP/0.9" response
Deal with tiny "HTTP/0.9" (header-less) responses by checking the
status-line early, even before a full "HTTP/" is received to allow
detecting 0.9 properly.
Test 1266 and 1267 added to verify.
Fixes #2420
Closes #2872
Diffstat (limited to 'lib/curl_setup.h')
-rw-r--r-- | lib/curl_setup.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 799d5fab9..24989874e 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -801,6 +801,11 @@ endings either CRLF or LF so 't' is appropriate. #define CURL_SA_FAMILY_T unsigned short #endif +/* Some convenience macros to get the larger/smaller value out of two given. + We prefix with CURL to prevent name collisions. */ +#define CURLMAX(x,y) ((x)>(y)?(x):(y)) +#define CURLMIN(x,y) ((x)<(y)?(x):(y)) + /* Some versions of the Android SDK is missing the declaration */ #if defined(HAVE_GETPWUID_R) && defined(HAVE_DECL_GETPWUID_R_MISSING) struct passwd; |