HTTP/1.0 200 Document Follows
<error happens here>
Right now I just sort of barf some HTML at the client, that includes an
error message, and hope it does the right thing (you might be in the middle
of a header or something).
I know that in general this isn't a big problem (the user figures out
something went wrong soon enough) but it seems like we should be able to
do this a little cleaner.
I was thinking about something like <ERROR>...</ERROR>, which could then
contain relevant facts about the error and local problem reporting
procedures if it was a server error. Clever clients would move the
error to the top and keep all other data intact just in case it's useful
in spite of the error.
You might even use </BODY><ERROR>...</ERROR> so that clients could
resync on the </BODY> in case they are inside of a <H1> or something,
this might make the parser a little easier.