{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/22476","repository_url":"https://api.github.com/repos/owncloud/core","labels_url":"https://api.github.com/repos/owncloud/core/issues/22476/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/22476/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/22476/events","html_url":"https://github.com/owncloud/core/issues/22476","id":134310642,"number":22476,"title":"Range request fail with GDrive stream wrapper, stream lies about being seekable","user":{"login":"PVince81","id":277525,"avatar_url":"https://avatars.githubusercontent.com/u/277525?v=3","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/app:files_external","name":"app:files_external","color":"02d7e1"},{"url":"https://api.github.com/repos/owncloud/core/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/owncloud/core/labels/comp:filesystem","name":"comp:filesystem","color":"d4c5f9"},{"url":"https://api.github.com/repos/owncloud/core/labels/sev2-high","name":"sev2-high","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"PVince81","id":277525,"avatar_url":"https://avatars.githubusercontent.com/u/277525?v=3","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/72","html_url":"https://github.com/owncloud/core/milestones/9.0.1-current-maintenance","labels_url":"https://api.github.com/repos/owncloud/core/milestones/72/labels","id":1580707,"number":72,"title":"9.0.1-current-maintenance","description":"","creator":{"login":"cmonteroluque","id":879976,"avatar_url":"https://avatars.githubusercontent.com/u/879976?v=3","gravatar_id":"","url":"https://api.github.com/users/cmonteroluque","html_url":"https://github.com/cmonteroluque","followers_url":"https://api.github.com/users/cmonteroluque/followers","following_url":"https://api.github.com/users/cmonteroluque/following{/other_user}","gists_url":"https://api.github.com/users/cmonteroluque/gists{/gist_id}","starred_url":"https://api.github.com/users/cmonteroluque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmonteroluque/subscriptions","organizations_url":"https://api.github.com/users/cmonteroluque/orgs","repos_url":"https://api.github.com/users/cmonteroluque/repos","events_url":"https://api.github.com/users/cmonteroluque/events{/privacy}","received_events_url":"https://api.github.com/users/cmonteroluque/received_events","type":"User","site_admin":false},"open_issues":100,"closed_issues":59,"state":"open","created_at":"2016-02-12T23:55:24Z","updated_at":"2016-03-15T09:45:22Z","due_on":"2016-04-05T04:00:00Z","closed_at":null},"comments":7,"created_at":"2016-02-17T15:26:27Z","updated_at":"2016-03-15T10:22:36Z","closed_at":null,"body":"### Steps to reproduce\r\n\r\n1. Setup GDrive storage as \"gdrive\"\r\n1. Upload a small text file with known contents\r\n3. `curl -X GET -H Range:bytes=2-5 'http://root:admin@localhost/owncloud/remote.php/webdav/gdrive/bacon.txt'`\r\n\r\n### Expected behaviour\r\nReturned bytes match\r\n\r\n### Actual behaviour\r\nReturned bytes start at the beginning of the stream\r\n\r\n### Version\r\nownCloud 9.0 git master 9c1248521a76d7d8e5c6c893cf73b149fdf80df1\r\n\r\n\r\nThis happens because the stream lies about being seekable when doing this check: https://github.com/owncloud/3rdparty/blob/master/sabre/dav/lib/DAV/CorePlugin.php#L336\r\n\r\nIf you debug into that block and evaluate the stream's metadata, its \"seekable\" value is true.\r\nHowever as soon as Sabre tries to do a `fseek` it will fail.\r\n\r\nI suspect this might be due to our stream wrappers which do implement `fseek`. We might need to somehow patch the wrappers to properly forward the underlying stream metadata.\r\n\r\n@icewind1991 @schiesbn "},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/196756189","html_url":"https://github.com/owncloud/core/issues/22476#issuecomment-196756189","issue_url":"https://api.github.com/repos/owncloud/core/issues/22476","id":196756189,"user":{"login":"PVince81","id":277525,"avatar_url":"https://avatars.githubusercontent.com/u/277525?v=3","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T10:22:36Z","updated_at":"2016-03-15T10:22:36Z","body":"Note that in 9.0 this isn't an issue any more because of the GDrive workaround using a temporary file.\r\n\r\nSo before applying the patch, let's find out which external storages support streaming and would suffer from the fseek issue.\r\n\r\nI suspect that Webdav/ownCloud external storages (and/or fed shares) might.\r\n"}}