pramsey / pgsql-http

HTTP client for PostgreSQL, retrieve a web page from inside the database.
MIT License
1.3k stars 116 forks source link

Set errno to 0 before strtol #151

Closed irisjae closed 1 year ago

irisjae commented 1 year ago

Refer to 'NOTES' section of https://man7.org/linux/man-pages/man3/strtol.3.html

Fixes cases where calls to the PL/pgSQL functions http_set_curlopt() and http() keep failing after errno is set. In such cases, "invalid integer provided for 'CURLOPT_XXX'" is reported in the logs, but the provided integer is in fact valid.