@@ -23,17 +23,17 @@ class HTTPWasmClient : public HTTPClient {
23
23
24
24
string path = host_port + info.url ;
25
25
path = info.url ;
26
- if (!web::experimental_s3_tables_global_proxy.empty ()) {
27
- if (info.url .rfind (web::experimental_s3_tables_global_proxy, 0 ) != 0 ) {
28
- auto id_table = path.find (" --table-s3.s3." );
29
- auto id_aws = path.find (" .amazonaws.com/" );
30
- if (id_table != std::string::npos && id_aws != std::string::npos && id_table < id_aws) {
31
- path = web::experimental_s3_tables_global_proxy + path.substr (8 );
32
- }
33
- }
34
- } else {
35
- path = " https://" + path;
36
- }
26
+ if (!web::experimental_s3_tables_global_proxy.empty ()) {
27
+ if (info.url .rfind (web::experimental_s3_tables_global_proxy, 0 ) != 0 ) {
28
+ auto id_table = path.find (" --table-s3.s3." );
29
+ auto id_aws = path.find (" .amazonaws.com/" );
30
+ if (id_table != std::string::npos && id_aws != std::string::npos && id_table < id_aws) {
31
+ path = web::experimental_s3_tables_global_proxy + path.substr (8 );
32
+ }
33
+ }
34
+ } else {
35
+ path = " https://" + path;
36
+ }
37
37
38
38
int n = 0 ;
39
39
for (auto h : info.headers ) {
@@ -137,8 +137,7 @@ class HTTPWasmClient : public HTTPClient {
137
137
138
138
if (!exe) {
139
139
res = make_uniq<HTTPResponse>(HTTPStatusCode::NotFound_404);
140
- res->reason =
141
- " Please consult the browser console for details, might be potentially a CORS error" ;
140
+ res->reason = " Please consult the browser console for details, might be potentially a CORS error" ;
142
141
} else {
143
142
res = duckdb::make_uniq<HTTPResponse>(HTTPStatusCode::OK_200);
144
143
uint64_t LEN = 0 ;
@@ -268,8 +267,7 @@ class HTTPWasmClient : public HTTPClient {
268
267
269
268
if (!exe) {
270
269
res = make_uniq<HTTPResponse>(HTTPStatusCode::NotFound_404);
271
- res->reason =
272
- " Please consult the browser console for details, might be potentially a CORS error" ;
270
+ res->reason = " Please consult the browser console for details, might be potentially a CORS error" ;
273
271
} else {
274
272
res = duckdb::make_uniq<HTTPResponse>(HTTPStatusCode::OK_200);
275
273
uint64_t LEN = 0 ;
@@ -402,8 +400,7 @@ xhr.setRequestHeader("Content-Type", "application/octet-stream");
402
400
403
401
if (!exe) {
404
402
res = make_uniq<HTTPResponse>(HTTPStatusCode::NotFound_404);
405
- res->reason =
406
- " Please consult the browser console for details, might be potentially a CORS error" ;
403
+ res->reason = " Please consult the browser console for details, might be potentially a CORS error" ;
407
404
} else {
408
405
res = duckdb::make_uniq<HTTPResponse>(HTTPStatusCode::OK_200);
409
406
uint64_t LEN = 0 ;
@@ -416,15 +413,12 @@ xhr.setRequestHeader("Content-Type", "application/octet-stream");
416
413
LEN *= 256 ;
417
414
LEN += ((uint8_t *)exe)[0 ];
418
415
res->body = string (exe + 4 , LEN);
419
- /*
416
+ /*
420
417
if (info.content_handler) {
421
418
info.content_handler((const unsigned char *)exe + 4, LEN);
422
419
}
423
-
424
- p
425
- */
426
-
427
- // info.buffer_out += string(exe+4, LEN);
420
+ */
421
+ // info.buffer_out += string(exe+4, LEN);
428
422
free (exe);
429
423
}
430
424
0 commit comments