Bug 238170

Summary: Fetching a Blob URL with an unbounded Range header do not generate a Content-Range response header
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, eric.carlson, jean-yves.avenard, pete.jungwirth, supersonicandtails, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch ews-feeder: commit-queue-

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. ***