Skip to content

Commit d9b0450

Browse files
committed
make format
1 parent 06a93fc commit d9b0450

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

lib/src/http_wasm.cc

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ class HTTPWasmClient : public HTTPClient {
2323

2424
string path = host_port + info.url;
2525
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+
}
3737

3838
int n = 0;
3939
for (auto h : info.headers) {
@@ -137,8 +137,7 @@ class HTTPWasmClient : public HTTPClient {
137137

138138
if (!exe) {
139139
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";
142141
} else {
143142
res = duckdb::make_uniq<HTTPResponse>(HTTPStatusCode::OK_200);
144143
uint64_t LEN = 0;
@@ -268,8 +267,7 @@ class HTTPWasmClient : public HTTPClient {
268267

269268
if (!exe) {
270269
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";
273271
} else {
274272
res = duckdb::make_uniq<HTTPResponse>(HTTPStatusCode::OK_200);
275273
uint64_t LEN = 0;
@@ -402,8 +400,7 @@ xhr.setRequestHeader("Content-Type", "application/octet-stream");
402400

403401
if (!exe) {
404402
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";
407404
} else {
408405
res = duckdb::make_uniq<HTTPResponse>(HTTPStatusCode::OK_200);
409406
uint64_t LEN = 0;
@@ -416,15 +413,12 @@ xhr.setRequestHeader("Content-Type", "application/octet-stream");
416413
LEN *= 256;
417414
LEN += ((uint8_t *)exe)[0];
418415
res->body = string(exe + 4, LEN);
419-
/*
416+
/*
420417
if (info.content_handler) {
421418
info.content_handler((const unsigned char *)exe + 4, LEN);
422419
}
423-
424-
p
425-
*/
426-
427-
// info.buffer_out += string(exe+4, LEN);
420+
*/
421+
// info.buffer_out += string(exe+4, LEN);
428422
free(exe);
429423
}
430424

0 commit comments

Comments
 (0)