зеркало из https://github.com/mozilla/gecko-dev.git
Fix form post bustage introduced by warren's stream changes
This commit is contained in:
Родитель
9fe88bca6a
Коммит
fb0511b3d3
|
@ -23,6 +23,8 @@
|
||||||
#include "nsHTTPEncodeStream.h"
|
#include "nsHTTPEncodeStream.h"
|
||||||
#include "nsIHTTPProtocolHandler.h"
|
#include "nsIHTTPProtocolHandler.h"
|
||||||
|
|
||||||
|
#include <prmem.h>
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// nsHTTPEncodeStream methods:
|
// nsHTTPEncodeStream methods:
|
||||||
|
|
||||||
|
@ -164,8 +166,23 @@ nsHTTPEncodeStream::Read(char* outBuf, PRUint32 outBufCnt, PRUint32 *result)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsHTTPEncodeStream::ReadSegments(nsWriteSegmentFun writer, void * closure, PRUint32 count, PRUint32 *_retval)
|
nsHTTPEncodeStream::ReadSegments(nsWriteSegmentFun writer, void * closure, PRUint32 count, PRUint32 *_retval)
|
||||||
{
|
{
|
||||||
NS_NOTREACHED("ReadSegments");
|
char* readBuf = (char*) PR_Malloc (count);
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
PRUint32 nBytes;
|
||||||
|
|
||||||
|
if (readBuf == NULL)
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
|
nsresult rv = Read (readBuf, count, &nBytes);
|
||||||
|
|
||||||
|
PRUint32 writeCount = 0;
|
||||||
|
*_retval = 0;
|
||||||
|
|
||||||
|
if (NS_SUCCEEDED (rv))
|
||||||
|
rv = writer (this, closure, readBuf, *_retval, nBytes, &writeCount);
|
||||||
|
|
||||||
|
PR_Free (readBuf);
|
||||||
|
|
||||||
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|
Загрузка…
Ссылка в новой задаче