{"issue":{"created_at":"2011-12-05T04:12:34Z","state":"open","updated_at":"2011-12-05T13:55:39Z","comments":5,"user":{"gravatar_id":"fd17a6b715d1b6c17c1d803eb3c89b58","id":142719,"url":"https://api.github.com/users/rwstauner","login":"rwstauner","avatar_url":"https://secure.gravatar.com/avatar/fd17a6b715d1b6c17c1d803eb3c89b58?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"https://metacpan.org/source/BRADH/HTML-JQuery-1.2.0/Changes\r\n\r\nreturns 404 and says \"resource not found\"\r\n\r\neven though I followed the link for the file from the Browse page:\r\n\r\nhttps://metacpan.org/source/BRADH/HTML-JQuery-1.2.0/\r\n\r\nI can confirm the file's existence with `cpanm --look HTML::JQuery`... the file is there, but empty.\r\n\r\nI'm guessing the site returns 404 because the `elsif ( $source->{raw} ) {` returns false for a zero-byte file\r\nand the else branch is `detach`:\r\nhttps://github.com/CPAN-API/metacpan-web/blob/master/lib/MetaCPAN/Web/Controller/Source.pm#L38\r\n\r\nSo I guess the question is what should we be doing, and what's the proper change?\r\n`exists $source->{raw}` ?\r\n`defined`?","assignee":null,"number":405,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"id":2445546,"labels":[{"color":"e10c02","name":"Bug","url":"https://api.github.com/repos/CPAN-API/metacpan-web/labels/Bug"},{"color":"DDDDDD","name":"Minor","url":"https://api.github.com/repos/CPAN-API/metacpan-web/labels/Minor"}],"title":"404 for Empty but existent files","html_url":"https://github.com/CPAN-API/metacpan-web/issues/405","closed_at":null,"url":"https://api.github.com/repos/CPAN-API/metacpan-web/issues/405","milestone":null},"action":"created","comment":{"created_at":"2011-12-05T13:55:39Z","updated_at":"2011-12-05T13:55:39Z","user":{"gravatar_id":"874db45ef3a1c18dec3cb18349f1e713","id":46471,"url":"https://api.github.com/users/monken","login":"monken","avatar_url":"https://secure.gravatar.com/avatar/874db45ef3a1c18dec3cb18349f1e713?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"I was referring to `defined` vs. `exists`","id":3017200,"url":"https://api.github.com/repos/CPAN-API/metacpan-web/issues/comments/3017200"}}