pramsey / pgsql-http

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

CURLOPT_DNS_SERVERS "An unknown option was passed in to libcurl" #169

Closed mazniak closed 1 year ago

mazniak commented 1 year ago

The CURLOPT_DNS_SERVERS options seems completely broken currently. I'm running a supabase local container which has libcurl 7.68.0 installed and I cannot seem to use this config.

SELECT http_set_curlopt('CURLOPT_DNS_SERVERS', '127.0.0.1');
-- ERROR:  An unknown option was passed in to libcurl

meanwhile

SELECT * FROM http_list_curlopt();

returns

+-----------------------+--------------+
|     curlopt           |   value      |
+-----------------------+--------------+
| CURLOPT_DNS_SERVERS   | 127.0.0.1    |
+-----------------------+--------------+
pramsey commented 1 year ago

Hm, no way to fix this on our end...

https://curl.se/libcurl/c/CURLOPT_DNS_SERVERS.html

"This option requires that libcurl was built with a resolver backend that supports this operation. The c-ares backend is the only such one."

The curl you are running against must not have been built with this option. (Mine hasn't either.)

mazniak commented 1 year ago

Ah thank you!