gnodet-bot commented on code in PR #2150:
URL: https://github.com/apache/maven-resolver/pull/2150#discussion_r4029014916
##########
maven-resolver-test-http/src/main/java/org/eclipse/aether/internal/test/util/http/HttpServer.java:
##########
@@ -654,7 +658,7 @@ Map<String, String> toUnmodifiableMap(HttpFields headers) {
}
Review Comment:
🚨 **Regression: regex change breaks resumable downloads.**
The original pattern `bytes=([0-9])+-` matches the RFC 7233 Range header
format (`bytes=<offset>-`), which is what transports send for resumable
downloads (e.g. `Range: bytes=1024-`). The new pattern `bytes=([0-9])+` removes
the trailing `-`, so it only matches bare digits like `bytes=1024` — not a
valid HTTP Range header. As a result, `m.matches()` will always return `false`
for any actual range request, `offset` stays 0, and every "resume" silently
restarts from the beginning. Any test that exercises partial download / resume
will either break or stop testing what it claims to test.
This change is unrelated to the stated purpose of the PR (HTTP/3 port
allocation retries) and should be reverted.
```suggestion
private static final Pattern SIMPLE_RANGE =
Pattern.compile("bytes=([0-9])+-");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]