Srinivasa Raghavan wrote:
To get postdata informations i am reading the data from nsIUploadChannel->uploadStream. After reading there is no more data available to send to the server.

You can rewind it by calling QueryInterface for nsISeekableStream.

                   postParams.AssignWithConversion("");

AssignWithConversion is deprecated, but this line is entirely pointless anyway (strings start out empty).

I want to note that your code will probably not handle binary post data (file uploads) particularly well.

                       postParams.AppendWithConversion("\r\n");

AppendWithConversion is also deprecated, although if this code is supposed to work for Gecko 1.7.x and earlier there is not really a good alternative (Append(NS_ConvertASCIItoUTF16("\r\n")) I suppose)

BTW, NS_InitLineBuffer/NS_ReadLine changed incompatibly in Gecko 1.8.

If all you want is to read all the data into a string, why do you bother with reading it linewise, why not just read chunks of bytes using nsIInputStream directly?

-biesi
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to