-
Notifications
You must be signed in to change notification settings - Fork 253
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
can not open mp4/mp3 by pc chrome and edge #239
Comments
In the same case, Mobile phone ok |
Is it a Keep-Alive problem? |
I'm no sure that it could be. If it uses the sendfile syscall it may get
confused.. not sure.
Can you try to disable sendfile (envvar `ONION_SENDFILE=0`) and/or keep
alive (`onion_request_set_no_keep_alive(req)`)?
If any of these work tell me to look closely.
David.
|
i test biger than 2G mp4 file and can not play by browser(chome / edge) thank you David |
code: example ofileserver have same problem
onion_connection_status www_resource(void *_, onion_request * req, onion_response * res)
{
return onion_shortcut_response_file(onion_request_get_fullpath(req) + 1, req, res);
}
chrome debug:
GET /%E9%A2%84%E8%A7%88Andreea%20Balan%20Feat.Silviu-Asa%20De%20Frumos.mp3 HTTP/1.1
Host: 127.0.0.1:20002
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Accept-Encoding: identity;q=1, *;q=0
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Accept: /
Referer: http://127.0.0.1:20002/%E9%A2%84%E8%A7%88Andreea%20Balan%20Feat.Silviu-Asa%20De%20Frumos.mp3
Accept-Language: en,zh-CN;q=0.9,zh;q=0.8,zh-TW;q=0.7
Cookie: sessionid=12345678
Range: bytes=0-
HTTP/1.1 206 Partial Content
Content-Length: 3027741
Content-Range: bytes 0-3027740/3027740
Content-Type: audio/mpeg
Date: Thu, 15 Nov 2018 12:03:15 CST
Etag: 2E331C-5BE7F6ADbytes=0-
Server: libonion v0.8.121.9dc1f - coralbits.com
program
[625D3700] [2018-11-15 12:03:15] [INFO response.c:195] [127.0.0.1] "GET /预览Andreea Balan Feat.Silviu-Asa De Frumos.mp3" 200 3027740 (Keep-Alive)
[625D3700] [2018-11-15 12:03:15] [ERROR shortcuts.c:266] Could not send all file (Transport endpoint is not connected)
[625D3700] [2018-11-15 12:03:15] [WARNING response.c:223] Trying to set length after headers sent. Undefined onion behaviour.
[625D3700] [2018-11-15 12:03:15] [INFO response.c:195] [127.0.0.1] "GET /预览Andreea Balan Feat.Silviu-Asa De Frumos.mp3" 500 73 (Close connection)
The text was updated successfully, but these errors were encountered: