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

can not open mp4/mp3 by pc chrome and edge #239

Open
demonelf opened this issue Nov 15, 2018 · 4 comments
Open

can not open mp4/mp3 by pc chrome and edge #239

demonelf opened this issue Nov 15, 2018 · 4 comments

Comments

@demonelf
Copy link

demonelf commented Nov 15, 2018

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)

@demonelf
Copy link
Author

In the same case, Mobile phone ok

@demonelf demonelf changed the title nat not open mp4/mp3 by pc chrome and edge can not open mp4/mp3 by pc chrome and edge Nov 15, 2018
@demonelf
Copy link
Author

Is it a Keep-Alive problem?

@davidmoreno
Copy link
Owner

davidmoreno commented Nov 15, 2018 via email

@demonelf
Copy link
Author

demonelf commented Nov 16, 2018

i test biger than 2G mp4 file and can not play by browser(chome / edge)
add onion_request_set_no_keep_alive(req) same
but Local player can play
This problem is difficult for me.
because i don't know mechanism that browser how to play video
I test onion_response_write can play
onion_shortcut_response_file didn't work
but don't have Range function

thank you David

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

No branches or pull requests

2 participants