dart-lang / http

A composable API for making HTTP requests in Dart.
https://pub.dev/packages/http
BSD 3-Clause "New" or "Revised" License
1.02k stars 353 forks source link

get `moz-extension` scheme file throws `ClientException: Invalid content-length header [-1]` #1240

Open Chralu opened 3 months ago

Chralu commented 3 months ago

Getting a file from a firefox extension, returns Content-length is -1.

Because of this, get method throws a ClientException: Invalid content-length header [-1]. exception.

await get('moz-extension://<extension-id>/index.html')

Should that check be disabled for moz-extension scheme ?

http version : 1.2.1