Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for range requests to the server #2140

Closed
zhuker opened this issue May 17, 2016 · 1 comment
Closed

Add support for range requests to the server #2140

zhuker opened this issue May 17, 2016 · 1 comment

Comments

@zhuker
Copy link

zhuker commented May 17, 2016

Expected behavior

Files served by karma http server should support Range: bytes=42-43

Actual behavior

Entire file is output

Enviroment Details

Karma version: 0.13.22

  • Karma version (output of karma --version):
  • Relevant part of your karma.config.js file

Steps to reproduce the behaviour

  1. Write in a test
var xhr = new XMLHttpRequest();
xhr.open("GET", "/base/big_binary_file.dat", true);
xhr.setRequestHeader("Range", "bytes=42-43");
xhr.responseType =  "arraybuffer";
xhr.onload = () => {
expect(xhr.response.byteLength).toBe(2) 
}
  1. Run test
  2. Test fails
@dignifiedquire dignifiedquire changed the title Range requests? Add support for range requests to the server Jun 26, 2016
@dignifiedquire
Copy link
Member

Thanks for the report, it's an interesting feature so if someone wants to implement it I'd be happy to accept a PR for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants