Handle hpost stream abort CURLE_READ_ERROR error code.
parent
435a0be37b
commit
e523cb4535
|
@ -44,10 +44,14 @@ static const char *LCURL_HTTPPOST = LCURL_HTTPPOST_NAME;
|
|||
# define LCURL_LEN_TYPE long
|
||||
#endif
|
||||
|
||||
/* 7.56.0 changed code for `curl_formget` if callback abort write
|
||||
* not sure is it bug or not so set only for single version
|
||||
/* 7.56.0 changed code for `curl_formget` if callback abort write.
|
||||
*
|
||||
* https://github.com/curl/curl/issues/1987#issuecomment-336139060
|
||||
* ... not sure its worth the effort to document its return codes to
|
||||
* any further extent then it currently is. This function is very
|
||||
* rarely used, and the new mime API doesn't even have a version of it.
|
||||
**/
|
||||
#if LCURL_CURL_VER_GE(7,56,0) && !LCURL_CURL_VER_GE(7,56,1)
|
||||
#if LCURL_CURL_VER_GE(7,56,0)
|
||||
# define LCURL_GET_CB_ERROR CURLE_READ_ERROR
|
||||
#else
|
||||
# define LCURL_GET_CB_ERROR (CURLcode)-1
|
||||
|
|
|
@ -20,8 +20,7 @@ local fname = "./test.download"
|
|||
|
||||
local utils = require "utils"
|
||||
|
||||
-- libcurl 7.56.0 does not add `Content-Type: text/plain`
|
||||
-- not sure is it bug or not
|
||||
-- Bug. libcurl 7.56.0 does not add `Content-Type: text/plain`
|
||||
local text_plain = utils.is_curl_eq(7,56,0) and 'test/plain' or 'text/plain'
|
||||
|
||||
local GET_URL = "http://127.0.0.1:7090/get"
|
||||
|
|
|
@ -14,8 +14,7 @@ local skip = lunit.skip or function() end
|
|||
|
||||
local utils = require "utils"
|
||||
|
||||
-- libcurl 7.56.0 does not add `Content-Type: text/plain`
|
||||
-- not sure is it bug or not
|
||||
-- Bug. libcurl 7.56.0 does not add `Content-Type: text/plain`
|
||||
local text_plain = utils.is_curl_eq(7,56,0) and 'test/plain' or 'text/plain'
|
||||
|
||||
local curl = require "lcurl"
|
||||
|
|
Loading…
Reference in New Issue