All TWiki scripts handle a contenttype parameter to set the content-type, e.g.
. The rest script should do the same.
Not totally sure what you mean here; the rest script will not normally generate a response with a status code set to something like 200 (success) or 500 (failure). If a rest function is going to respond with something else - e.g. a block of XML - then that will be handled in the rest function itself. The
script should not try to second-guess how it is being used. Yes, I know about the
parameter, but this is something we kept for compatibility; it's really not the way rest scripts should be used (it should be deprecated).
If you can give a real use-case for the content-type of the page response to be handled by
, then it would be a good idea to open a discussion on Codev and propose an enhancement. I don't see this as a code bug, though the documentation could do with improvement so I'm redirecting this to Documentation.