If the format is not supported or not set, fuel doesn't set the status of the response but return the data. Is that really logical ?
For example, if I want to set a special status because some parameters are missing in the request I can't do that if the format is not asked explicitly.
Ok but by default it's return html. I think there is a problem in the _detect_format method. It pass in the " if (\Input::server('HTTP_ACCEPT') and \Config::get('rest.ignore_http_accept') !== true) " on line 229 on so it return html and not the default format, I don't really understand what's append.
And this don't explain why it doesn't set the status if the format is not supported in the else scope line 196. I think the line 190 need to be after the if else structure, no ?
It will return HTML if you request the method by the browser, as that's what the HTTP_ACCEPT header says you accept. In normal circumstances it will never reach the "if all else fails" bit...
So when and why do you think you get an unsupported format?
I don't say that I get an unsupported format, I simply make a reference to the comment on line 193 "// Format not supported, output directly".
My problem is when I call for example http://monsite.com/controller/method without the format specify. If I pass a status in the response method this status will not be set by the response method.
Note that your method should return the return value of $this->response(), if not the after() method will construct a new response due to a lack of response from your method.