Bug 238170 - Fetching a Blob URL with an unbounded Range header do not generate a Content-Range response header
Summary: Fetching a Blob URL with an unbounded Range header do not generate a Content-...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
: 238113 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-03-21 17:03 PDT by Jer Noble
Modified: 2022-03-24 10:21 PDT (History)
6 users (show)

See Also:


Attachments
Patch (6.95 KB, patch)
2022-03-21 17:15 PDT, Jer Noble
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2022-03-21 17:03:43 PDT
Fetching a Blob URL with an unbounded Range header do not generate a Content-Range response header
Comment 1 Jer Noble 2022-03-21 17:15:09 PDT
Created attachment 455304 [details]
Patch
Comment 2 Jean-Yves Avenard [:jya] 2022-03-21 23:54:21 PDT
Comment on attachment 455304 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=455304&action=review

> Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp:279
> +        }

seems to be a lot of duplicated code around here.
Comment 3 EWS 2022-03-22 08:47:16 PDT
Committed r291622 (248715@main): <https://commits.webkit.org/248715@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 455304 [details].
Comment 4 Radar WebKit Bug Importer 2022-03-22 08:48:15 PDT
<rdar://problem/90637966>
Comment 5 Darin Adler 2022-03-22 09:42:01 PDT
Comment on attachment 455304 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=455304&action=review

> Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp:276
> +                rangeEnd = m_totalSize - 1;

Why is -1 correct?
Comment 6 Jer Noble 2022-03-22 16:11:30 PDT
(In reply to Darin Adler from comment #5)
> Comment on attachment 455304 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=455304&action=review
> 
> > Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp:276
> > +                rangeEnd = m_totalSize - 1;
> 
> Why is -1 correct?

Because a Content-Range header's "range end" is inclusive. (Which I agree is weird from a C++ POV.)
Comment 7 Jer Noble 2022-03-24 10:21:23 PDT
*** Bug 238113 has been marked as a duplicate of this bug. ***