From 1e2df0a6875daa00f48de00fc34f2edde3a682aa Mon Sep 17 00:00:00 2001 From: Siddhartha Singh Date: Fri, 6 Mar 2026 06:07:01 +0530 Subject: [PATCH 1/2] fix: resolve false cache hits by forwarding encoding headers and adding Vary --- app-next/src/app/api/proxy-file/route.ts | 36 ++++++++++++++++++------ 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/app-next/src/app/api/proxy-file/route.ts b/app-next/src/app/api/proxy-file/route.ts index 0ea5816e..4784cf8e 100644 --- a/app-next/src/app/api/proxy-file/route.ts +++ b/app-next/src/app/api/proxy-file/route.ts @@ -42,9 +42,14 @@ export async function GET(request: NextRequest) { } try { + // Forward the client's Accept-Encoding to avoid serving gzip/brotli to + // clients that can't handle it (fixes #367) + const clientEncoding = request.headers.get("accept-encoding") || "identity"; + const response = await fetch(url, { headers: { "User-Agent": "OpenML-NextApp/1.0", + "Accept-Encoding": clientEncoding, }, }); @@ -64,26 +69,39 @@ export async function GET(request: NextRequest) { upstreamContentType.includes("octet-stream") || upstreamContentType.includes("parquet"); + // Pass through content-encoding so the client knows if it's compressed + const contentEncoding = response.headers.get("content-encoding"); + if (isBinary) { // Binary response (parquet files) const buffer = await response.arrayBuffer(); + const binaryHeaders: Record = { + "Content-Type": "application/octet-stream", + "Content-Length": buffer.byteLength.toString(), + "Cache-Control": "public, max-age=86400", + "Vary": "Accept-Encoding", + }; + if (contentEncoding) { + binaryHeaders["Content-Encoding"] = contentEncoding; + } return new NextResponse(buffer, { status: 200, - headers: { - "Content-Type": "application/octet-stream", - "Content-Length": buffer.byteLength.toString(), - "Cache-Control": "public, max-age=86400", - }, + headers: binaryHeaders, }); } else { // Text response (ARFF, CSV, predictions) const text = await response.text(); + const textHeaders: Record = { + "Content-Type": upstreamContentType, + "Cache-Control": "public, max-age=3600", + "Vary": "Accept-Encoding", + }; + if (contentEncoding) { + textHeaders["Content-Encoding"] = contentEncoding; + } return new NextResponse(text, { status: 200, - headers: { - "Content-Type": upstreamContentType, - "Cache-Control": "public, max-age=3600", - }, + headers: textHeaders, }); } } catch (error) { From e8be66645469e8ca4ec478929bdc533d0b415f8e Mon Sep 17 00:00:00 2001 From: Siddhartha Singh Date: Fri, 6 Mar 2026 09:05:24 +0530 Subject: [PATCH 2/2] Fix: Correct Developer Docs 404 and malformed footer link (#383) --- .../app/[locale]/(learn)/contribute/page.tsx | 6 +- app-next/src/components/layout/footer.tsx | 2 +- .../client/app/src/pages/docs/GetInvolved.js | 118 +++++++++--------- 3 files changed, 63 insertions(+), 63 deletions(-) diff --git a/app-next/src/app/[locale]/(learn)/contribute/page.tsx b/app-next/src/app/[locale]/(learn)/contribute/page.tsx index ce9aa271..7e9c09d5 100644 --- a/app-next/src/app/[locale]/(learn)/contribute/page.tsx +++ b/app-next/src/app/[locale]/(learn)/contribute/page.tsx @@ -286,8 +286,8 @@ export default async function ContributePage({ icon: Code, }, { - label: "Docs", - href: "https://docs.openml.org/Website/", + label: "Developer docs", + href: "https://docs.openml.org/contributing/website/Website/", icon: BookOpen, }, ].map((item) => ( @@ -332,7 +332,7 @@ export default async function ContributePage({