[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: well-formedness error
On 19 Jun 2004, at 11:38, Asbjørn Ulsberg wrote:
+1 On this solution.
On Thu, 17 Jun 2004 10:16:14 +0200, Danny Ayers <danny666@xxxxxxxxxxx>
Perhaps, but the rules themselves shouldn't be lenient.
Absolutely. What I think may be something we can reach consensus on is:
- Ill-formed XML should not be silently parsed by aggregators.
PaceServiceError should be an important part of the spec.
Could one not generalize and create an ERROR header in addition to GET,
that one could propose to whichever standards body deals with this?
It would not do anything (perhaps send an acknowledgment back or
something), and just
log the ERROR in the log file. This looks like a solution to solve this
problem for everybody. This seems like a very simple addition to HTTP,
and it will probably work anyway, because my bet it that all web
servers will log bad requests anyway.
It kind of works already. Here is what I did
hjs@bblfish:0$ telnet localhost 80
telnet: connect to address ::1: Connection refused
Connected to localhost.
Escape character is '^]'.
ERROR /index.html HTTP/1.1
Message: invalid XML
HTTP/1.1 501 Method Not Implemented
Date: Sat, 19 Jun 2004 10:10:37 GMT
Server: Apache/1.3.29 (Darwin)
Allow: GET, HEAD, OPTIONS, TRACE
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<TITLE>501 Method Not Implemented</TITLE>
<H1>Method Not Implemented</H1>
ERROR to /index.html not supported.<P>
Invalid method in request ERROR /index.html HTTP/1.1<P>
<ADDRESS>Apache/1.3.29 Server at bblfish.local Port 80</ADDRESS>
Connection closed by foreign host.
And this is what I got in my error log
[Sat Jun 19 12:10:45 2004] [error] [client 127.0.0.1] Invalid method in
request ERROR /index.html HTTP/1.1
So it does not log the message which would be useful. But it nearly
does the right thing.
- Atom served with wrong HTTP headers MAY be excusable.
I think allowing ill-formed XML spreading around is much, much worse
than allowing for some bad HTTP headers now and then. The headers at
least don't force one to use regex and other evil methods to parse
XML. Everything contained in the XML document should be well-formed
according to XML specs. XML over HTTP is another ballgame, but Atom
should still state how things should be done -- in a non-lenient way.
 <url: http://www.intertwingly.net/wiki/pie/PaceServiceError>
Asbjørn Ulsberg -=|=- asbjornu@xxxxxxxxxxx
«He's a loathsome offensive brute, yet I can't look away»