Closed Bug 125886 Opened 23 years ago Closed 23 years ago

xml-rpc request body starts with \r\n before <?xml version...

Categories

(Core :: XML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 124861

People

(Reporter: afranke, Assigned: samuel)

Details

This is probably a networking issue, but I'm filing it here in XML component
until I know where it belongs.

Tested in a 2002-02-08 debug build.

Per the xml recommendation, xml documents MUST NOT have any whitespace before
the <?xml version="1.0"?> declaration:

 [1] document ::= prolog element Misc*
[22] prolog   ::= XMLDecl? Misc* (doctypedecl Misc*)?
[23] XMLDecl  ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'

My parser is very strict here: it does not accept '<?xml' after whitespace
(except for '<?xml-stylesheet').

I found that mozilla's xml-rpc call contains two empty lines after the POST
request headers:

POST /RPC2 HTTP/1.1\r\n
Host: gentzen:34567\r\n
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8+)
Gecko/20020208\r\n
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1\r\n
Accept-Language: en-us\r\n
Accept-Encoding: gzip, deflate, compress;q=0.9\r\n
Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66\r\n
Keep-Alive: 300\r\n
Connection: keep-alive\r\n
Content-Length: 167\r\n
Content-Type: text/xml\r\n
\r\n
\r\n
<?xml version="1.0" encoding="ISO-8859-1"?>\n
<methodCall><methodName>mbase.getXML</methodName><params><param><value><i4>123</i4></value></param></params></methodCall>

Now I can certainly change my parser to be less strict, but the fact that so far
mozilla is the only client violating the standard seems odd.
Looks like this is a known problem. Found this in bug 122495:

> ------- Additional Comment #13 From Martijn Pieters 2002-02-12 17:21 -------
> 
> It wasn't possible just to check in the fix for removing the newline on POSTs? 
> [...]
Ok, next time I will look for resolved bugs before filing a duplicate... :-)

*** This bug has been marked as a duplicate of 124861 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
vrfy
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.