Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Curl Enhancement: ignoring specific HTTP status codes while failing on others
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Xander Bos via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 5 Jan 2021 15:32:29 +0100
Hi everyone,
I'm currently in the process of updating to a more recent version of
libcurl at my company.
In the past, we've made customizations to the curl sources to suit our
use-case, however going forward we want to do things the correct way.
In our application, there are certain HTTP error codes that we would
like to handle ourselves, while we'd like libcurl to handle the rest.
What I propose is to add a configuration option so that we can let
these status codes fall through as if they returned CURLE_OK, while
letting all other error codes be handled by curl.
The option could be named something like:
CURLOPT_HTTP_IGNORE_STATUSCODES, and given multiple long values that
can be checked in the `http_should_fail` function.
I'd be contributing an implementation for this to the libcurl project,
so that we can use it going forward.
Let me know what you think.
With kind regards,
Xander Bos
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-01-05
Date: Tue, 5 Jan 2021 15:32:29 +0100
Hi everyone,
I'm currently in the process of updating to a more recent version of
libcurl at my company.
In the past, we've made customizations to the curl sources to suit our
use-case, however going forward we want to do things the correct way.
In our application, there are certain HTTP error codes that we would
like to handle ourselves, while we'd like libcurl to handle the rest.
What I propose is to add a configuration option so that we can let
these status codes fall through as if they returned CURLE_OK, while
letting all other error codes be handled by curl.
The option could be named something like:
CURLOPT_HTTP_IGNORE_STATUSCODES, and given multiple long values that
can be checked in the `http_should_fail` function.
I'd be contributing an implementation for this to the libcurl project,
so that we can use it going forward.
Let me know what you think.
With kind regards,
Xander Bos
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-01-05