Relanding patch for bug 137155 on trunk because we think it may be OK now.
Patch by darin, r+sr=bzbarsky+biesi, a=bzbarsky git-svn-id: svn://10.0.0.236/trunk@232998 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -44,7 +44,9 @@
|
||||
#include "nsHttpRequestHead.h"
|
||||
#include "nsHttpResponseHead.h"
|
||||
#include "nsHttpChunkedDecoder.h"
|
||||
#include "nsNetSegmentUtils.h"
|
||||
#include "nsTransportUtils.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsProxyRelease.h"
|
||||
#include "nsIOService.h"
|
||||
#include "nsAutoLock.h"
|
||||
@@ -266,7 +268,12 @@ nsHttpTransaction::Init(PRUint8 caps,
|
||||
rv = multi->AppendStream(requestBody);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
mRequestStream = multi;
|
||||
// wrap the multiplexed input stream with a buffered input stream, so
|
||||
// that we write data in the largest chunks possible. this is actually
|
||||
// necessary to workaround some common server bugs (see bug 137155).
|
||||
rv = NS_NewBufferedInputStream(getter_AddRefs(mRequestStream), multi,
|
||||
NET_DEFAULT_SEGMENT_SIZE);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
else
|
||||
mRequestStream = headers;
|
||||
|
||||
Reference in New Issue
Block a user