What are the format/contents of the ContentRange string
See original GitHub issueIt would be helpful if this page described the format for this string. Just saying it’s a string isn’t that valuable.
Looking at the code in sdk\storage\Azure.Storage.Blobs\src\Models\ContentRange.cs
I see the below comments, so I assume this is the format.
To be extra helpful, it would also be good to know if Azure Blob Storage ever does return *
for the blob size, of if you can reliably get the size in bytes of the blob from this field when requesting ranges.
/* Parse header value (e.g. "<unit> <start>-<end>/<blobSize>")
* Either side of the "/" can be an asterisk, so possible results include:
* [<unit>, <start>, <end>, <blobSize>]
* [<unit>, "*", <blobSize>]
* [<unit>, <start>, <end>, "*"]
* [<unit>, "*", "*"] (unsure if possible but not hard to support)
* "End" is the inclusive last byte; e.g. header "bytes 0-7/8" is the entire 8-byte blob
*/
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: a5018390-040d-4f72-84b5-f8262968e0d4
- Version Independent ID: 5bbaf33b-8f4b-3858-278e-63b222b81dc5
- Content: BlobDownloadDetails.ContentRange Property (Azure.Storage.Blobs.Models) - Azure for .NET Developers
- Content Source: xml/Azure.Storage.Blobs.Models/BlobDownloadDetails.xml
- Service: azure
- GitHub Login: @rloutlaw
- Microsoft Alias: routlaw
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Content-Range - HTTP - MDN Web Docs - Mozilla
The Content-Range response HTTP header indicates where in a full body message a partial message belongs. Header type, Response header, Payload ...
Read more >HTTP range requests - MDN Web Docs - Mozilla
The Content-Range response header indicates where in the full resource this partial message belongs. Multipart ranges. The Range header also ...
Read more >Standard numeric format strings
In this article, learn to use standard numeric format strings to format common numeric types into text representations in .NET.
Read more >String.Format Method (System)
Converts the value of objects to strings based on the formats specified and inserts them into another string. If you are new to...
Read more >What's the "Content-Length" field in HTTP header?
It's the number of bytes of data in the body of the request or response. The body is the part that comes after...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, sorry about that, I think I was quick editting it and missed that part.
The following documentation won’t exactly look this but should look something similar like this. This might change depending on feedback during code review.
I might have to update this further once I gather more information and feedback.
Thanks @amnguye . So to clarify, as of today, the content-range header returned is always of the format “bytes x-y/z”, where x, y, and z are integers? The code comment you included in your post still states
Either side of the "/" can be an asterisk
, but your wording also statesThe service does not utilize passing back a * in the content range
, which seems contradictory.