Spaces:
Paused
Paused
Merge pull request #59 from icebear0828/fix/oauth-accept-encoding
Browse files- src/tls/curl-fetch.ts +6 -6
src/tls/curl-fetch.ts
CHANGED
|
@@ -31,9 +31,9 @@ export async function curlFetchGet(
|
|
| 31 |
): Promise<CurlFetchResponse> {
|
| 32 |
const transport = getTransport();
|
| 33 |
const headers = buildAnonymousHeaders();
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
|
| 38 |
const result = await transport.get(url, headers, 30, options?.proxyUrl);
|
| 39 |
return {
|
|
@@ -54,9 +54,9 @@ export async function curlFetchPost(
|
|
| 54 |
): Promise<CurlFetchResponse> {
|
| 55 |
const transport = getTransport();
|
| 56 |
const headers = buildAnonymousHeaders();
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
headers["Content-Type"] = contentType;
|
| 61 |
|
| 62 |
const result = await transport.simplePost(url, headers, body, 30, options?.proxyUrl);
|
|
|
|
| 31 |
): Promise<CurlFetchResponse> {
|
| 32 |
const transport = getTransport();
|
| 33 |
const headers = buildAnonymousHeaders();
|
| 34 |
+
// Let --compressed auto-negotiate Accept-Encoding based on curl's actual
|
| 35 |
+
// decompression capabilities, avoiding error 61 on builds lacking br/zstd.
|
| 36 |
+
delete headers["Accept-Encoding"];
|
| 37 |
|
| 38 |
const result = await transport.get(url, headers, 30, options?.proxyUrl);
|
| 39 |
return {
|
|
|
|
| 54 |
): Promise<CurlFetchResponse> {
|
| 55 |
const transport = getTransport();
|
| 56 |
const headers = buildAnonymousHeaders();
|
| 57 |
+
// Let --compressed auto-negotiate Accept-Encoding based on curl's actual
|
| 58 |
+
// decompression capabilities, avoiding error 61 on builds lacking br/zstd.
|
| 59 |
+
delete headers["Accept-Encoding"];
|
| 60 |
headers["Content-Type"] = contentType;
|
| 61 |
|
| 62 |
const result = await transport.simplePost(url, headers, body, 30, options?.proxyUrl);
|