Assigned
Status Update
Comments
ev...@gmail.com <ev...@gmail.com> #2
Hello,
Thank you for reaching out to us!
This issue seems to be outside of the scope of Issue Tracker. This Issue Tracker is a forum for end users to report bugs
and request features
on Google Cloud products. Please go through
I recommend you to
For now, I'm going to close this thread which will no longer be monitored. In case you want to report a new issue, please do not hesitate to create a new Issue Tracker describing your issue.
Thank you!
rb...@google.com <rb...@google.com> #3
Thank you for bringing this to our attention. I have forwarded your report to the engineering team and any questions they have will be posted here. Further status updates will be posted here as well.
Description
--- Apps running in the development server
* If you are having problems with the SDK, please tell us about
the SDK that you are using:
* version
--- 1.9.18 - 2015-02-18
* language
--- PHP
* operating system
--- MAC OS X
* How can someone else reproduce the problem?
--- In Chrome and Firefox, when one has an <audio> or <video> object on a page via , a "Range: byte=0-" request header is sent to retrieve the file. It seems the dev_appserver.py server is failing on an index out of bound error. Note that the video or audio file is being served from GCS via CloudStorageTools::getPublicUrl(). Also the issue doesn't occur with Safari, as its request headers are different.
* What is the expected output?
--- a 200* type http response with the <audio> or <video> object loaded with the file ready to play.
* What do you see instead?
--- <audio> or <video> component cannot play the file. Checking the server logs you see the following:
ERROR 2015-03-05 06:54:51,474 module.py:821] Request to '/_ah/gcs/app_default_bucket/54f7f198c0ada17254747324.wav' failed
INFO 2015-03-05 06:54:51,474 module.py:737] default: "GET /_ah/gcs/app_default_bucket/54f7f198c0ada17254747324.wav HTTP/1.1" 500 -
On an older SDK, the error print out is more instructive:
ERROR 2015-03-05 07:30:59,347 module.py:717] Request to '/_ah/gcs/app_default_bucket/54f7f198c0ada17254747324.wav' failed
Traceback (most recent call last):
File "/Users/cR/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 713, in _handle_request
return handler.handle(match, environ, wrapped_start_response)
File "/Users/cR/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/wsgi_handler.py", line 59, in handle
return self._wsgi_app(environ, start_response)
File "/Users/cR/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/gcs_server.py", line 56, in __call__
status_message = httplib.responses.get(e.args[1], '')
IndexError: tuple index out of range
***while writing this issue, I decided to look further into this and provide a fix. Seems that Chrome and Firefox doesn't set the Range header properly. They set it like, Range: bytes=1-0, when doing a <video> or <audio> tag.
Fix is for the _Range class in stub_dispatcher.py:
class _Range(_Header):
"""_Range header.
Used by read. Format: Range: bytes=1-3.
"""
HEADER = 'Range'
def __init__(self, headers):
super(_Range, self).__init__(headers)
if self.value:
start, end = self.value.rsplit('=', 1)[-1].split('-')
if end == '': # cR - the fix
end = long(start) + 1 # cR - should this be bounded/limited - security issue???
start, end = long(start), long(end)
else:
start, end = 0, None
self.value = start, end
Not sure if the above is good python. Haven't used it in a while. Please could this be fixed in this or in the browser. Moreover, for production purposes, we'd definitely need this working.
Thanks a mil!
BR,
cR