{"action":"closed","issue":{"url":"https://api.github.com/repos/kaltura/nginx-vod-module/issues/308","repository_url":"https://api.github.com/repos/kaltura/nginx-vod-module","labels_url":"https://api.github.com/repos/kaltura/nginx-vod-module/issues/308/labels{/name}","comments_url":"https://api.github.com/repos/kaltura/nginx-vod-module/issues/308/comments","events_url":"https://api.github.com/repos/kaltura/nginx-vod-module/issues/308/events","html_url":"https://github.com/kaltura/nginx-vod-module/issues/308","id":156016678,"number":308,"title":"Range requests in remote mode","user":{"login":"newrushbolt","id":19495016,"avatar_url":"https://avatars.githubusercontent.com/u/19495016?v=3","gravatar_id":"","url":"https://api.github.com/users/newrushbolt","html_url":"https://github.com/newrushbolt","followers_url":"https://api.github.com/users/newrushbolt/followers","following_url":"https://api.github.com/users/newrushbolt/following{/other_user}","gists_url":"https://api.github.com/users/newrushbolt/gists{/gist_id}","starred_url":"https://api.github.com/users/newrushbolt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newrushbolt/subscriptions","organizations_url":"https://api.github.com/users/newrushbolt/orgs","repos_url":"https://api.github.com/users/newrushbolt/repos","events_url":"https://api.github.com/users/newrushbolt/events{/privacy}","received_events_url":"https://api.github.com/users/newrushbolt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-20T17:51:50Z","updated_at":"2016-05-23T11:40:24Z","closed_at":"2016-05-23T11:40:24Z","body":"Hello.\r\n\r\nLooks like nginx-vod-module doesn't use Range requests in Remote mode.\r\n\r\nRequest to server with nginx-vod-module:\r\n```\r\n$ curl -I -H 'Host:userXXXXX.test1.ru' 'edge.test1.ru/test.mp4/manifest.mpd'\r\nHTTP/1.1 502 Bad Gateway\r\nServer: nginx\r\nDate: Fri, 20 May 2016 17:20:50 GMT\r\nContent-Type: text/html\r\nContent-Length: 166\r\nConnection: keep-alive\r\n```\r\n\r\nDumped request from server with nginx-vod-module to upstream server:\r\n```\r\nGET /test.mp4 HTTP/1.1\r\nHost: core.test1.ru\r\nUser-Agent: curl/7.29.0\r\n```\r\n\r\nResponse from upstream:\r\n```\r\nHTTP/1.1 200 OK\r\nServer: nginx\r\nDate: Fri, 20 May 2016 17:02:32 GMT\r\nContent-Type: video/mp4\r\nContent-Length: 261767\r\nLast-Modified: Wed, 20 Apr 2016 11:27:07 GMT\r\nConnection: keep-alive\r\nETag: \"5717678b-3fe87\"\r\nAccept-Ranges: bytes\r\n```\r\n\r\nAnd error due to not using Range:\r\n\r\n`2016/05/20 20:02:32 [alert] 6992#6992: *1 upstream buffer is too small to read response while reading response header from upstream, server: ~^userXXXXX\\., request: \"HEAD /test.mp4/manifest.mpd HTTP/1.1\", subrequest: \"/user_vod_up/test.mp4\", upstream: \"http://XXX.XXX.XXX.XXX:80/test.mp4\", host: \"userXXXXX.test1.ru\"`\r\n\r\nUpstream server supports Range requests:\r\n```\r\n$ curl -I -H 'Range: bytes=0-1024' core.test1.ru/test.mp4\r\nHTTP/1.1 206 Partial Content\r\nServer: nginx\r\nDate: Fri, 20 May 2016 17:48:11 GMT\r\nContent-Type: video/mp4\r\nContent-Length: 1025\r\nLast-Modified: Wed, 20 Apr 2016 11:27:07 GMT\r\nConnection: keep-alive\r\nETag: \"5717678b-3fe87\"\r\nContent-Range: bytes 0-1024/261767\r\n```\r\n\r\nConfig on server with nginx-vod-module:\r\n\r\n```\r\nupstream userXXXXX {\r\n    server core.test1.ru max_fails=1;\r\n    keepalive 300;\r\n}\r\n\r\nserver {\r\n    listen 80;\r\n    server_name ~^userXXXXX\\.;\r\n\r\n    location ~* \\.mp4/(.*\\.mpd|.*\\.m4s|init.*\\.mp4)$ {\r\n        vod_align_segments_to_key_frames on;\r\n        vod_manifest_segment_durations_mode accurate;\r\n        vod dash;\r\n        vod_mode remote;\r\n        vod_segment_duration 4000;\r\n        vod_upstream_location /user_vod_up;\r\n        vod_bootstrap_segment_durations 1000;\r\n        vod_dash_absolute_manifest_urls off;\r\n    }\r\n\r\n    location ~* /user_vod_up/(.*)$ {\r\n        internal;\r\n        proxy_http_version 1.1;\r\n        proxy_next_upstream error timeout http_404 http_403 http_502;\r\n        proxy_cache userXXXXX_mp4;\r\n        proxy_set_header Host core.test1.ru;\r\n        proxy_set_header Connection \"\";\r\n        proxy_buffering off;\r\n        proxy_pass http://userXXXXX/$1;\r\n    }\r\n}\r\n\r\n```\r\n\r\nWhat should we change to make nginx-vod-module user Range requests while getting data from upstream?"}}
{"actor":{"display_login":"newrushbolt"}}