#18679·jsdelivr

Cloudflare CDN shifts response data for range requests

Author: lukebrodyCreated Feb 21, 2026Updated Jul 8, 2026
Labelsin progress

Description

When jsdelivr uses the Cloudflare CDN, range requests are served incorrectly. The data is shifted to the right by 4 bytes.

Affected jsDelivr links

Correct Response

bash
curl -s \
  'https://cdn.jsdelivr.net/gh/densitydb/densitydb.github.io@96c5d0cf96cd2fdf57f3e95d642e931e699777e3/data/07%2F9.blob' \
  -H 'range: bytes=122102-140043' \
  --connect-to cdn.jsdelivr.net::jsdelivr.map.fastly.net: \
  | xxd -l 32
00000000: 1f8b 0808 0000 0000 02ff 4e65 7720 596f  ..........New Yo
00000010: 726b 2063 6974 792c 204e 6577 2059 6f72  rk city, New Yor

Incorrect Response

(db3e 0000 are the previous bytes in the file)

bash
curl -s \
  'https://cdn.jsdelivr.net/gh/densitydb/densitydb.github.io@96c5d0cf96cd2fdf57f3e95d642e931e699777e3/data/07%2F9.blob' \
  -H 'range: bytes=122102-140043' \
  --connect-to cdn.jsdelivr.net::cdn.jsdelivr.net.cdn.cloudflare.net: \
  | xxd -l 32
00000000: db3e 0000 1f8b 0808 0000 0000 02ff 4e65  .>............Ne
00000010: 7720 596f 726b 2063 6974 792c 204e 6577  w York city, New

Response headers

Correct Response

with byte count to show shift

bash
curl -v \
  'https://cdn.jsdelivr.net/gh/densitydb/densitydb.github.io@96c5d0cf96cd2fdf57f3e95d642e931e699777e3/data/07%2F9.blob' \
  -H 'range: bytes=122102-140043' \
  --connect-to cdn.jsdelivr.net::jsdelivr.map.fastly.net: \
  | wc -c
* Connecting to hostname: jsdelivr.map.fastly.net
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Host jsdelivr.map.fastly.net:443 was resolved.
* IPv6: (none)
* IPv4: 151.101.65.229, 151.101.129.229, 151.101.193.229, 151.101.1.229
*   Trying 151.101.65.229:443...
* Connected to jsdelivr.map.fastly.net (151.101.65.229) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
} [321 bytes data]
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* (304) (IN), TLS handshake, Unknown (8):
{ [19 bytes data]
* (304) (IN), TLS handshake, Certificate (11):
{ [2837 bytes data]
* (304) (IN), TLS handshake, CERT verify (15):
{ [264 bytes data]
* (304) (IN), TLS handshake, Finished (20):
{ [36 bytes data]
* (304) (OUT), TLS handshake, Finished (20):
} [36 bytes data]
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=jsdelivr.net
*  start date: Jun  2 15:43:52 2025 GMT
*  expire date: Jul  4 15:43:51 2026 GMT
*  subjectAltName: host "cdn.jsdelivr.net" matched cert's "*.jsdelivr.net"
*  issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Atlas R3 DV TLS CA 2025 Q2
*  SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://cdn.jsdelivr.net/gh/densitydb/densitydb.github.io@96c5d0cf96cd2fdf57f3e95d642e931e699777e3/data/07%2F9.blob
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: cdn.jsdelivr.net]
* [HTTP/2] [1] [:path: /gh/densitydb/densitydb.github.io@96c5d0cf96cd2fdf57f3e95d642e931e699777e3/data/07%2F9.blob]
* [HTTP/2] [1] [user-agent: curl/8.7.1]
* [HTTP/2] [1] [accept: */*]
* [HTTP/2] [1] [range: bytes=122102-140043]
> GET /gh/densitydb/densitydb.github.io@96c5d0cf96cd2fdf57f3e95d642e931e699777e3/data/07%2F9.blob HTTP/2
> Host: cdn.jsdelivr.net
> User-Agent: curl/8.7.1
> Accept: */*
> range: bytes=122102-140043
> 
* Request completely sent off
< HTTP/2 206 
< access-control-allow-origin: *
< access-control-expose-headers: *
< timing-allow-origin: *
< cache-control: public, max-age=31536000, s-maxage=31536000, immutable
< cross-origin-resource-policy: cross-origin
< x-content-type-options: nosniff
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< x-jsd-version: 96c5d0cf96cd2fdf57f3e95d642e931e699777e3
< x-jsd-version-type: commit
< content-type: application/octet-stream
< etag: W/"4cfa4-L5QcjCVUBDbdfTI7Tek6kJcedKw"
< accept-ranges: bytes
< age: 41043
< content-range: bytes 122102-140043/315300
< date: Sat, 21 Feb 2026 10:05:35 GMT
< x-served-by: cache-fra-etou8220195-FRA, cache-pao-kpao1770035-PAO
< x-cache: HIT, HIT
< vary: Accept-Encoding
< alt-svc: h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
< content-length: 17942
< 
{ [1369 bytes data]
100 17942  100 17942    0     0   122k      0 --:--:-- --:--:-- --:--:--  121k
* Connection #0 to host jsdelivr.map.fastly.net left intact
   17942

Incorrect Response

bash
curl -v \
  'https://cdn.jsdelivr.net/gh/densitydb/densitydb.github.io@96c5d0cf96cd2fdf57f3e95d642e931e699777e3/data/07%2F9.blob' \
  -H 'range: bytes=122102-140043' \
  --connect-to cdn.jsdelivr.net::cdn.jsdelivr.net.cdn.cloudflare.net: \
  | wc -c
* Connecting to hostname: cdn.jsdelivr.net.cdn.cloudflare.net
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Host cdn.jsdelivr.net.cdn.cloudflare.net:443 was resolved.
* IPv6: (none)
* IPv4: 104.16.174.226, 104.16.175.226
*   Trying 104.16.174.226:443...
* Connected to cdn.jsdelivr.net.cdn.cloudflare.net (104.16.174.226) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
} [321 bytes data]
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* (304) (IN), TLS handshake, Unknown (8):
{ [19 bytes data]
* (304) (IN), TLS handshake, Certificate (11):
{ [4681 bytes data]
* (304) (IN), TLS handshake, CERT verify (15):
{ [264 bytes data]
* (304) (IN), TLS handshake, Finished (20):
{ [36 bytes data]
* (304) (OUT), TLS handshake, Finished (20):
} [36 bytes data]
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=*.jsdelivr.net
*  start date: Apr 25 00:00:00 2025 GMT
*  expire date: May  4 23:59:59 2026 GMT
*  subjectAltName: host "cdn.jsdelivr.net" matched cert's "*.jsdelivr.net"
*  issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
*  SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://cdn.jsdelivr.net/gh/densitydb/densitydb.github.io@96c5d0cf96cd2fdf57f3e95d642e931e699777e3/data/07%2F9.blob
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: cdn.jsdelivr.net]
* [HTTP/2] [1] [:path: /gh/densitydb/densitydb.github.io@96c5d0cf96cd2fdf57f3e95d642e931e699777e3/data/07%2F9.blob]
* [HTTP/2] [1] [user-agent: curl/8.7.1]
* [HTTP/2] [1] [accept: */*]
* [HTTP/2] [1] [range: bytes=122102-140043]
> GET /gh/densitydb/densitydb.github.io@96c5d0cf96cd2fdf57f3e95d642e931e699777e3/data/07%2F9.blob HTTP/2
> Host: cdn.jsdelivr.net
> User-Agent: curl/8.7.1
> Accept: */*
> range: bytes=122102-140043
> 
* Request completely sent off
< HTTP/2 206 
< date: Sat, 21 Feb 2026 10:06:38 GMT
< content-type: application/octet-stream
< cf-ray: 9d156ea4fe6bebf3-SJC
< access-control-allow-origin: *
< access-control-expose-headers: *
< timing-allow-origin: *
< cache-control: public, max-age=31536000, s-maxage=31536000, immutable
< cross-origin-resource-policy: cross-origin
< x-content-type-options: nosniff
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< x-jsd-version: 96c5d0cf96cd2fdf57f3e95d642e931e699777e3
< x-jsd-version-type: commit
< etag: W/"4cfa4-L5QcjCVUBDbdfTI7Tek6kJcedKw"
< age: 8654
< x-served-by: cache-fra-etou8220195-FRA, cache-sjc10049-SJC
< x-cache: HIT, MISS
< vary: Accept-Encoding
< alt-svc: h3=":443"; ma=86400
< content-range: bytes 122102-140043/315305
< cf-cache-status: HIT
< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=Zkd3QgYWzX1dbLN%2BhQJxLajHo%2Bq%2FpjfeLJp5QPTntPJBblYiUEHksVu%2FYyFZ4ooUFOg%2FrEx7ZXQYEBxwABievmyAzTInpfoDsaueuqd1nZ8pSTYVfRuOmSbPuycdeh6EQV4%3D"}],"group":"cf-nel","max_age":604800}
< nel: {"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}
< server: cloudflare
< 
{ [1360 bytes data]
100 17942    0 17942    0     0  49635      0 --:--:-- --:--:-- --:--:-- 49700
* Connection #0 to host cdn.jsdelivr.net.cdn.cloudflare.net left intact
   17942

Information

  • Device OS: macOS Version 26.2 (25C56)
  • Browser & Version: curl 8.7.1
  • VPN provider: None
  • Your location: US, San Francisco

Requisites

  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.
  • I understand that not filling out this template correctly will lead to the issue being closed.

Additional content

No response