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

Fix #2 #18

Merged
merged 1 commit into from May 11, 2018
Merged

Fix #2 #18

merged 1 commit into from May 11, 2018

Conversation

soyuka
Copy link
Contributor

@soyuka soyuka commented Apr 25, 2018

Maybe that this implementation is too naive?

Ideas/reviews welcome: 8a28c48 !

@soyuka soyuka requested a review from bcomnes April 25, 2018 14:04
@coveralls
Copy link

coveralls commented Apr 25, 2018

Pull Request Test Coverage Report for Build 73

  • 10 of 10 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.9%) to 85.714%

Totals Coverage Status
Change from base Build 72: 0.9%
Covered Lines: 82
Relevant Lines: 87

💛 - Coveralls

@soyuka soyuka requested a review from e-e-e April 26, 2018 07:24
Copy link
Member

@e-e-e e-e-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment on related to previous test. But just thinking about this a bit more, it might be good to have this be an option, for example { strict: false }. As if I am using dat-http I really want it to fail hard if the site I am trying to serve from does not support ranges. Otherwise it will just warn and act normally while potentially making a lot of requests to the server and discarding a lot of the transfered data. That is unless we also look at setting up a cache so sites that do not support byte ranges can then be read from memory - only fetch once. But that could be painful and complex.

@@ -85,7 +87,7 @@ test('it does not use node http/s when in browser', (t) => {
t.end()
})

test('raHttp.open() callback returns error if server does not support range requests', (t) => {
test.skip('raHttp.open() callback returns error if server does not support range requests', (t) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you probably don't want to skip this right? Perhaps update to reflect the changes. Or just remove entirely.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's always better to keep old tests even if they're not running. Although I don't like to change tests because it usually means I broke smth.

I like your option to enable/disable the strict behavior and I'll implement this!

@e-e-e
Copy link
Member

e-e-e commented Apr 26, 2018

Oh also - @soyuka thank you so much for jumping on these issues. Its really appreciated.

}
```

#### `file.write(offset, buffer, [callback])`

**Not implemented!** Please let us know if you have opinions on how to implement this.
**Not implemented!** Please let us know if you have opinions on how to implement this.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should remove this. Unless the said server implements a given API there will be no write-ability.

@soyuka soyuka merged commit b9ba569 into random-access-storage:master May 11, 2018
@soyuka soyuka deleted the fix-2 branch May 11, 2018 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants