Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/httpfs_extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ static void LoadInternal(ExtensionLoader &loader) {
"`default` are currently supported for duckdb-wasm");
}
#ifndef EMSCRIPTEN
if (value == "curl") {
if (value == "curl" || value == "default") {
if (!config.http_util || config.http_util->GetName() != "HTTPFSUtil-Curl") {
config.http_util = make_shared_ptr<HTTPFSCurlUtil>();
}
return;
}
if (value == "httplib" || value == "default") {
if (value == "httplib") {
if (!config.http_util || config.http_util->GetName() != "HTTPFSUtil") {
config.http_util = make_shared_ptr<HTTPFSUtil>();
}
Expand All @@ -116,7 +116,7 @@ static void LoadInternal(ExtensionLoader &loader) {
if (config.http_util && config.http_util->GetName() == "WasmHTTPUtils") {
// Already handled, do not override
} else {
config.http_util = make_shared_ptr<HTTPFSUtil>();
config.http_util = make_shared_ptr<HTTPFSCurlUtil>();
}

auto provider = make_uniq<AWSEnvironmentCredentialsProvider>(config);
Expand Down
2 changes: 1 addition & 1 deletion test/sql/copy/s3/download_config.test
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Unable to connect to URL "http://test-bucket-public.
statement error
SELECT i FROM "http://test-bucket-public.duckdb-minio-non-existent-host.com:9000/root-dir/non-existent-file-ljaslkjdas.parquet" LIMIT 3
----
Could not establish connection error for HTTP HEAD to 'http://test-bucket-public.
<REGEX>:.*IO Error.*HTTP HEAD to 'http://test-bucket-public.duckdb-minio-non-existent-host.*

# S3 errors should throw on
statement error
Expand Down
4 changes: 2 additions & 2 deletions test/sql/copy/s3/http_proxy.test
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ set http_proxy_password='yyy'
statement error
FROM 's3://test-bucket/proxy-test/test.parquet'
----
Could not establish connection
<REGEX>:.*IO Error.*HTTP HEAD to 'http://test-bucket.*

# Now a working one
statement ok
Expand Down Expand Up @@ -98,7 +98,7 @@ require-env HTTP_PROXY
statement error
FROM 's3://test-bucket/proxy-test/test.parquet'
----
Could not establish connection
<REGEX>:.*IO Error.*HTTP HEAD to 'http://test-bucket.*

statement ok
CREATE SECRET http1 (
Expand Down
2 changes: 1 addition & 1 deletion test/sql/copy/s3/url_encode.test
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ set s3_endpoint='s3.some.random.endpoint.com';
statement error
SELECT * FROM '${prefix}test-bucket/whatever.parquet';
----
Could not establish connection error for HTTP HEAD to 'http://test-bucket.s3.some.random.endpoint.com/whatever.parquet'
<REGEX>:.*IO Error.*Could not.*error for HTTP HEAD to.*

statement ok
set s3_endpoint='${DUCKDB_S3_ENDPOINT}'
Expand Down
4 changes: 2 additions & 2 deletions test/sql/secret/secret_refresh.test
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ CREATE SECRET s1 (
statement error
FROM "s3://test-bucket/test-file.parquet"
----
HTTP Error: HTTP GET error on 'http://test-bucket.duckdb-minio.com:9000/test-file.parquet' (HTTP 403)
<REGEX>:.*HTTP Error:.*403.*

query I
SELECT message[0:46] FROM duckdb_logs WHERE message like '%Successfully refreshed secret%'
Expand Down Expand Up @@ -125,7 +125,7 @@ set s3_access_key_id='bogus'
statement error
FROM "s3://test-bucket/test-file.parquet"
----
HTTP Error: HTTP GET error on 'http://test-bucket.duckdb-minio.com:9000/test-file.parquet' (HTTP 403)
<REGEX>:.*HTTP Error:.*403.*

# -> log empty
query II
Expand Down
4 changes: 2 additions & 2 deletions test/sql/secrets/create_secret.test_slow
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ secret_scope_1 s3 ['s3://b1']
statement error
FROM 's3://b1/test.csv'
----
Could not establish connection error for HTTP HEAD to 'https://b1.invalid-on-purpose-2/test.csv'
<REGEX>:.*IO Error.*HTTP HEAD to 'https://b1.invalid-on-purpose-2/test.csv'.*

# Now confirm we can also set multiple scopes
statement ok
Expand All @@ -73,4 +73,4 @@ secret_scope_2 s3 ['s3://b2', 's3://b3']
statement error
FROM 's3://b2/test.csv'
----
Could not establish connection error for HTTP HEAD to 'https://b2.invalid-on-purpose-3/test.csv'
<REGEX>:.*IO Error.*HTTP HEAD to 'https://b2.invalid-on-purpose-3/test.csv'.*
6 changes: 3 additions & 3 deletions test/sql/secrets/create_secret_cascading.test_slow
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ CREATE SECRET s2 (
statement error
FROM 's3://url-style-only/test.csv'
----
Could not establish connection error for HTTP HEAD to 'http://url-style-only.invalid-on-purpose-setting/test.csv'
<REGEX>:.*IO Error.*HTTP HEAD to 'http://url-style-only.invalid-on-purpose-setting/test.csv'.*

# Both Url style and endpoint are used now
statement error
FROM 's3://url-style-and-endpoint/test.csv'
----
Could not establish connection error for HTTP HEAD to 'http://url-style-and-endpoint.invalid-on-purpose-secret/test.csv'
<REGEX>:.*IO Error.*HTTP HEAD to 'http://url-style-and-endpoint.invalid-on-purpose-secret/test.csv'.*

# This request matches none of the secrets, we use the settings
statement error
FROM 's3://test-bucket/test.csv'
----
Could not establish connection error for HTTP HEAD to 'http://invalid-on-purpose-setting/test-bucket/test.csv'
<REGEX>:.*IO Error.*HTTP HEAD to 'http://invalid-on-purpose-setting/test-bucket/test.csv'.*
2 changes: 1 addition & 1 deletion test/sql/secrets/create_secret_gcs.test_slow
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ __default_gcs gcs config ['gcs://', 'gs://']
statement error
FROM 'gcs://test-bucket/test.csv'
----
https://storage.googleapis.com/test-bucket/test.csv
<REGEX>:.*HTTP Error:.*403.*
2 changes: 1 addition & 1 deletion test/sql/secrets/persistent_key_value_secret.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ select
from
read_json('https://non.existant/endpoint');
----
IO Error: Could not establish connection error for HTTP HEAD to 'https://non.existant/endpoint'
<REGEX>:.*IO Error.*HTTP HEAD to 'https://non.existant/endpoint'.*
Loading