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

> >            iBytesRead = mRequestStream->Read(aBuf, 1024, &rv);
>
> try changing this to:
>
>   rv = mRequestStream->Read(aBuf, sizeof(aBuf), &iBytesRead);
>
>
> -Darin

Yep, that did the trick! Thanks, Darin!

The reason I had the rv as the third arg was because file nsIInputStream.h
has the following for the prototype of Read(). (It says that it returns the
number of bytes read. And I assumed the _retval arg was for an exit
status.):

  /**
     * Read data from the stream.
     *
     * @param aBuf the buffer into which the data is to be read
     * @param aCount the maximum number of bytes to be read
     *
     * @return number of bytes read (may be less than aCount).
     * @return 0 if reached end of file
     *
     * @throws NS_BASE_STREAM_WOULD_BLOCK if reading from the input stream
would
     *   block the calling thread (non-blocking mode only)
     * @throws <other-error> on failure
     */
  /* [noscript] unsigned long read (in charPtr aBuf, in unsigned long
aCount); */
  NS_IMETHOD Read(char * aBuf, PRUint32 aCount, PRUint32 *_retval) = 0;


Also, thanks for pointing me to the LiveHTTPHeaders site. I've installed it,
and that plugin is very helpful in seeing what is going on in HTTP
transactions.

--Mike


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

Reply via email to