Mattias Wadman on Nostr: TIL HTTP range header is a inclusive range so requesting range 0- (whole file) you ...
TIL HTTP range header is a inclusive range so requesting range 0- (whole file) you might get 416 range not satisfiable if the file is empty as there is no byte at index 0. Fortunately most HTTP file servers (golang, gcs, etc) ignores this for empty files and return 200 instead.
#http
Published at
2024-10-10 07:09:30Event JSON
{
"id": "01baef33836baafd0ee4c2ec2717980b0ccc840167e2ce1a2e2b658b4bf52054",
"pubkey": "b1a2d3871f56029214e221d0df7c120053d620ce0326c05a83178ccb04ce51df",
"created_at": 1728544170,
"kind": 1,
"tags": [
[
"t",
"http"
],
[
"proxy",
"https://fosstodon.org/users/wader/statuses/113281870766592465",
"activitypub"
]
],
"content": "TIL HTTP range header is a inclusive range so requesting range 0- (whole file) you might get 416 range not satisfiable if the file is empty as there is no byte at index 0. Fortunately most HTTP file servers (golang, gcs, etc) ignores this for empty files and return 200 instead.\n\n#http",
"sig": "3eddba5251dcb6890a89a84130c2bb6a453e4539b68d44d3c5b652ebb79b24773e9c700f18a87082b0f9780163c958d101e40a9b786aa50a923ec12cb20f450d"
}