I have noticed that when doing an AsyncRead with "POST" , there is only one
CRLF following headers (verified this with EtherPeek).  Is this a bug ?
Currently I'm having to prepend my POST data with CRLF as a workaround.

Error checking and release of pointers omitted for brevity.

    nsIHTTPChannel * httpchannel = nsnull;
    channel->QueryInterface(kHttpChannelIID , (void **) &httpchannel);
    nsIAtom * method = m_fnNS_NewAtom("POST");
    nsIAtom * contentlen = m_fnNS_NewAtom("content-length");
    httpchannel->SetRequestMethod(method);
    httpchannel->SetUploadStream(postDataStream);
    char szBuf[512];
    httpchannel->SetRequestHeader(contentlen, itoa(dwSize, szBuf, 10));

    rv = channel->AsyncRead(pbc, nsnull);

The data I see go out on the wire looks like this
POST /NoResp HTTP/1.1CRLF
Content-Length: 128CRLF
etc..
Keep-Alive: 300CRLF
POSTDATA

Shouldnt it look like this
POST /NoResp HTTP/1.1CRLF
Content-Length: 128CRLF
etc..
Keep-Alive: 300CRLF
CRLF
POSTDATA

Thanks in advance for the help.

-pete



Reply via email to