Azurite vs. Blob storage Range header inconsistency
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 393
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 36
Description
### Which service(blob, file, queue, table) does this issue concern?
blob
### Which version of the Azurite was used?
3.18
### Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
In the [Julia](https://github.com/JuliaLang/julia/) ecosystem, we have a system for packaging cross-platform "binary artifacts"; so the [azurite_jll](https://github.com/JuliaBinaryWrappers/azurite_jll.jl) repo is a Julia package that provides a node runtime & azurite javascript files that can run on supported platforms.
### What's the Node.js version?
16.15 (as provided [here](https://github.com/JuliaBinaryWrappers/NodeJS_16_jll.jl))
### What problem was encountered?
When I make a signed request with the `Range` header like:
```
GET /devstoreaccount1/jl-azurite-23624/test6.csv HTTP/1.1
│ Range: bytes=0-8388607
│ Host: 127.0.0.1:41606
│ Accept: */*
│ User-Agent: HTTP.jl/1.8.0-rc3
│ Content-Length: 0
│ Accept-Encoding: gzip
│ x-ms-date: Wed, 14 Sep 2022 18:54:51 GMT
│ x-ms-version: 2020-04-08
│ Authorization: SharedKey devstoreaccount1:/2uZrhkeWUF+uyIURjrg7PKCTImDK+3J2kVEFy51QVA=
```
I get a successful 206 response back, like:
```
HTTP/1.1 206 Partial Content
│ Server: Azurite-Blob/3.18.0
│ last-modified: Wed, 14 Sep 2022 18:45:09 GMT
│ x-ms-creation-time: Wed, 14 Sep 2022 18:45:09 GMT
│ content-length: 0
│ content-type: application/octet-stream
│ content-range: bytes 0--1/0
│ etag: "0x23A7EC871C26440"
│ content-md5: 1B2M2Y8AsgTpgAmY7PhCfg==
│ x-ms-blob-type: BlockBlob
│ x-ms-lease-state: available
│ x-ms-lease-status: unlocked
│ x-ms-request-id: 8cb500af-903f-45a5-b9e7-636bc342cf50
│ x-ms-version: 2021-08-06
│ accept-ranges: bytes
│ date: Wed, 14 Sep 2022 18:54:51 GMT
│ x-ms-server-encrypted: true
│ x-ms-blob-content-md5: 1B2M2Y8AsgTpgAmY7PhCfg==
│ Connection: keep-alive
│ Keep-Alive: timeout=5
```
But issuing the same kind of "Range" request against actual blob storage results in a response like:
```
HTTP/1.1 416 Requested Range Not Satisfiable
│ Content-Length: 249
│ Content-Type: application/xml
│ Content-Range: bytes */0
│ Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
│ x-ms-request-id: xxxxxxx
│ x-ms-version: 2020-04-08
│ x-ms-error-code: InvalidRange
│ Date: Wed, 14 Sep 2022 18:56:17 GMT
│
│ InvalidRangeThe range specified is invalid for the current size of the resource.
│ RequestId:xxxxxxxx
│ Time:2022-09-14T18:56:18.1411730Z"""
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.