Michael Mangino wrote:

"Darin Fisher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]


Michael Mangino wrote:


<snip>


I can't find where I can get ahold of the request body
that is sent in a POST request.


<snip>


you could read nsHttpChannel::mUploadStream and then rewind it (via
nsISeekableStream::Seek) after you are finished reading it.



I've already tried that with the nsIInputStream::Read() method, which I can't get to read anything. (See code below.) What's weird is that the nsIInputStream::Available() method that I call right before Read() does return a value that I can see change when I change my POST data length.. Yet, Read() always returns 0 and leaves aBuf empty. Any idea why this doesn't work? Is using Read() not the right approach? Here's the code:

        if (mRequestStream)
        {
           char aBuf[1024];
           int iBytesRead;
           uint uiAvail;

           mRequestStream->Available(&uiAvail);
           iBytesRead = mRequestStream->Read(aBuf, 1024, &rv);





try changing this to:


rv = mRequestStream->Read(aBuf, sizeof(aBuf), &iBytesRead);


-Darin _______________________________________________ Mozilla-netlib mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-netlib

Reply via email to