fix(sirv): a request with range headers appends Content-Length, Conte…#75
fix(sirv): a request with range headers appends Content-Length, Conte…#75lukeed merged 7 commits intolukeed:masterfrom
Conversation
…nt-Range and Accept-Ranges for all subsequent requests. Fixes lukeed#55
Codecov Report
@@ Coverage Diff @@
## master #75 +/- ##
=======================================
Coverage 98.50% 98.50%
=======================================
Files 2 2
Lines 67 67
=======================================
Hits 66 66
Misses 1 1 Continue to review full report at Codecov.
|
|
Thanks! Do you think you could add test(s) for this? Could be able to do the same thing you've illustrated with |
|
@lukeed I think the test suite will have to include a few more cases which will fail even with the fix, example: bytes=0-499, -500 [x,y] would be parsed incorrectly, yet that is a valid header for bytes. Is it the intention of sirv to have full support for range requests? |
|
Let's worry about the other |
…nge request headers
…ts are already covered by other tests
|
@lukeed gave the tests a go, first commit of tests passed, cleaned up the tests to avoid repetition and now checks failed. I cant spot what would cause that, any hints? |
lukeed
left a comment
There was a problem hiding this comment.
Thank you :)
The CLI tests periodically fail. My process-spawner is a little rough but it gets the job done reasonably okay, haha
A request with Range headers present will result in the headers object being modified for all subsequent requests.
To reproduce:
Image used for above test: