From 036b9711d0c8cb5db249050bbc47661d4e18a1af Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Mar 2026 10:21:30 +0000 Subject: [PATCH 1/2] Initial plan From e31bc542da4341d05242976f980374e330634a59 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Mar 2026 10:22:29 +0000 Subject: [PATCH 2/2] fix(file-response): only return 416 when range header is present Co-authored-by: nmaguiar <11761746+nmaguiar@users.noreply.github.com> --- src/com/nwu2/httpd/responses/FileResponse.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/nwu2/httpd/responses/FileResponse.java b/src/com/nwu2/httpd/responses/FileResponse.java index a04dff34c..d897bc3f8 100644 --- a/src/com/nwu2/httpd/responses/FileResponse.java +++ b/src/com/nwu2/httpd/responses/FileResponse.java @@ -236,7 +236,7 @@ else if (len < 1024 * 1024) } } } - if (startFrom < 0 || startFrom >= f.length()) { + if (range != null && (startFrom < 0 || startFrom >= f.length())) { return new com.nwu2.httpd.responses.SimpleResponse(httpd, com.nwu2.httpd.NanoHTTPD.Response.Status.RANGE_NOT_SATISFIABLE, Codes.MIME_PLAINTEXT, "Requested Range Not Satisfiable");