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

A RuntimeError occured: Unknown format 'blah' #13

Closed
floehopper opened this issue Sep 11, 2012 · 5 comments
Closed

A RuntimeError occured: Unknown format 'blah' #13

floehopper opened this issue Sep 11, 2012 · 5 comments

Comments

@floehopper
Copy link
Member

This causes a 500 HTTP status code to be returned. I wonder whether it ought to be a 406? And in the case where no file exists for any format, perhaps it should be a 404 i.e. the particular case I'm looking at is a request for /apple-touch-icon-precomposed.png, but no file or snip apple-touch-icon-precomposed exists, so shouldn't this be a 404?

@tomafro
Copy link
Contributor

tomafro commented Sep 11, 2012

I think you are right. It should be 404 if no such resource exists. 406
if the resource exists but not in the requested format. For our website I
think it would be OK to respond with 404 rather than 406 in these cases.

On 11 September 2012 08:46, James Mead notifications@github.com wrote:

This causes a 500 HTTP status code to be returned. I wonder whether it
ought to be a 406? And in the case where no file exists for any format,
perhaps it should be a 404 i.e. the particular case I'm looking at is a
request for /apple-touch-icon-precomposed.png, but no file or snip
apple-touch-icon-precomposed exists, so shouldn't this be a 404?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13.

@floehopper
Copy link
Member Author

I think I've fixed the 404 case in 0c9c8c6. The 406 seems less important right now, so I'm going to leave it.

@floehopper
Copy link
Member Author

@chrisroos: Do you think this is fixed?

@chrisroos
Copy link
Member

I can see that requests for /apple-touch-icon-precomposed.png (curl --head http://gofreerange.com/apple-touch-icon-precomposed.png) return a 404 so that looks good to me.

Are there other requests that still cause the same problem, though?

@floehopper
Copy link
Member Author

There's not really enough info in this (very old) issue to respond to @chrisroos' question, so I'm going to close it in the hope that the new Rails version of the app doesn't suffer from this problem.

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

3 participants