Proposal: 8355572: Implement Range header support for jwebserver
Daisuke Yamazaki
d.yamazaki at peya.tokyo
Thu Oct 23 14:49:24 UTC 2025
Thank you for the clarification and context.
I understand that there is a legitimate need for Range header support.
However, whether such a feature is necessary for the simple jwebserver is
still open for discussion.
Nevertheless, while the benefits are clear, I do not see any significant
drawbacks apart from potential maintainability or slight code growth.
I personally think it would be reasonable to implement this feature.
I plan to wait for a bit to allow further discussion, and if no objections
arise, I intend to proceed with the implementation.
---- On Thu, 23 Oct 2025 02:56:29 +0900 Ethan McCue <ethan at mccue.dev> wrote ---
> Adding for context that there are legitimate usages for this that are within the jdk httpserver's remit of jwebserver and educational purposes. Cheerpj would let a student run their java code in a browser and requires range headers support.
>
> On Wed, Oct 22, 2025, 7:23 AM Daisuke Yamazaki <d.yamazaki at peya.tokyo> wrote:
>
> Hello all,
>
> I would like to work on implementing Range header support for jwebserver,
> related to JDK-8355572.
> Before I start working on it, i'd like to confirm whether it's okay for me to
> take this issue.
>
> Here's my current design idea:
>
> 1. Introduce a RangeEntry record inside FileServerHandler to represent
> each requested range
> 2. In FileServerHandler.serveFile(), detect the Range header and parse it into
> a list of RangeEntry objects.
> If parsing fails or the range is invalid, return 416 Range Not Satisfiable.
> 3. If multiple ranges are specified, generate a random boundary
> string and return a multipart/byteranges response.
>
> Please let me know if it’s okay for me to proceed with this implementation,
> or if there are any design points I should consider before starting.
>
> Thanks,
> D. Yamazak
>
More information about the net-dev
mailing list