On Aug 3, 2009, at 12:39 PM, Minjal Shah wrote:
> Hi Paul,
>
> The request that has leading spaces, was sent out using netcat.
> As you pointed out, the grammer does not allow it, BAD REQUEST is
> justified. Thanks !
>
> But, now with the request like the below where the XMLDecl is
> omitted, does not mind getting leading spaces.
>
> POST /abc/xyz HTTP/1.1
> Content-Type: application/xml
> Host: localhost:9998
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> Content-Length: 112
>
> <VSEDHCPConfigResource><a>value1</a><b>valueb</b><c>valuec</
> c><d>valued</d><e>valuee</e></VSEDHCPConfigResource>
>
> Please explain.
>
I do not see any leading spaces in the above. Note the Content-Length
value of 112. That is the number of characters that make up the XML
document.
I think you may be confusing the CRLF that is required for HTTP to
demarcate the HTTP headers and the start of the request entity. Look
at the grammar specified for HTTP here:
http://greenbytes.de/tech/webdav/rfc2616.html#http.message
Paul.