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
Support partial request for media resource #1050
Conversation
@nicolaiarocci: what do you think? Personally I do not see test coverage... |
Hello and thanks for this. It is indeed a very cool feature. However, it would also need test coverage. |
eve/endpoints.py
Outdated
if g[0]: | ||
byte1 = int(g[0]) | ||
if g[1]: | ||
byte2 = int(g[1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
g[1]
might be empty string, which will break int('')
:
>>> int('')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: ''
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicolaiarocci Yes, I will update the test as soon as possible.
@peterdemin Thank you for correcting me.
This is still waiting on proper test coverage. Are you still planning to add it? |
Thanks for the commit update. I really want to merge this but I can't in its current state. Still waiting for test coverage. |
Refactored, rebased, test-covered, and finally merged. See 9ee2b5b |
* upstream/master: (32 commits) Get rid of unwanted .vscode folder Add support for mongo $box geo query operator Marsch Huynh Improve partial downloads documentation Changelog for pyeve#1050 Test coverage for pyeve#1050 A little refactoring (DRY). Addresses pyeve#1050. fix: media endpoint Support partial request for media resource Officially deprecate Python 2.6 Changelog for pyeve#1130 Reduced error description details Fix PUT behavior with User-Restricted Resource Access flake8 typo Hung Le Changelog for pyeve#1095. Regression test for PR pyeve#1095. Oplog skipped even if confg.OPLOG=True DHuan ...
I am creating an API for record and playback audio. I use Eve as a main lib for my project.
Without partial request, my player in my phone (iPhone) can not work.
So I change a little code to make Eve support partial request for the media resource.
Hope that makes sense.
Thanks.