2017-01-06 39 views
0

플라스크를 실행하는 동안 Azure에서 podcast를 호스팅하려고합니다. 그러나 .mp3 파일은 IIS에서 직접 제공되는 정적 콘텐츠이기 때문에 Flask/Python 부분이 여기 관련이 있다고 생각하지 않습니다. iTunes와 내 XML의 유효성을 검사하려고 할 때Azure에서 호스팅 한 Flask 응용 프로그램에서 Itunes podcast 요구 사항을 준수하도록 바이트 범위 요청을 어떻게 설정할 수 있습니까?

, 나는이 메시지를 얻을 :

Can’t submit your feed. Your episodes are hosted on a server which does not support byte-range requests. Enable byte-range requests and try again.

을 그리고 나는이 작업을 수행하는 방법을 알아낼 수 없었다.

답변

0

어떤 Azure 서비스를 추천하고 있습니까? 앱 서비스 Accept-Ranges에서

은 기본적으로 설정되어 있습니다 :

$ curl -i http://surpriseapp.azurewebsites.net/song.mp3 

HTTP/1.1 200 OK 
Content-Length: 10114593 
Content-Type: audio/mpeg 
Accept-Ranges: bytes  

Lavf52.84.0 ���D �aA�Kr���a�n��=-㏼`�1� ��i 
q�D5��e�/@kq|�:�G3%�`|K�cX�����kי��q��ŎNR�ם 
<< rest of binary content follows >> 


$ curl -i -H "Range: bytes=0-" http://surpriseapp.azurewebsites.net/song.mp3 

HTTP/1.1 206 Partial Content 
Content-Length: 10114593 
Content-Type: audio/mpeg 
Content-Range: bytes 0-10114592/10114593 
Accept-Ranges: bytes 

Lavf52.84.0 ���D �aA�Kr���a�n��=-㏼`�1� ��i 
q�D5��e�/@kq|�:�G3%�`|K�cX�����kי��q��ŎNR� 
<< rest of binary content follows >> 


$ curl -i -H "Range: bytes=200-300" http://surpriseapp.azurewebsites.net/song.mp3 

HTTP/1.1 206 Partial Content 
Content-Length: 101 
Content-Type: audio/mpeg 
Content-Range: bytes 200-300/10114593 
Accept-Ranges: bytes 

3��P�P�(�|�LF�����?4s� 
A ���� <<<<0��Y�ms�|�晍l���2��FsP]A�x&�Ó�����;%�`L 

희망 애플이 명시 적으로 요청과 Range: 헤더를 보내지 않고 206 Partial Content을 기대하지 않습니다. 그건 바보 같을거야.

관련 문제