From 0606c4d07c0c774dde0fbd9303404ccf9fb0a8ab Mon Sep 17 00:00:00 2001 From: "valeski%netscape.com" Date: Thu, 9 Dec 1999 06:20:50 +0000 Subject: [PATCH] r=rhp. 21195. a=jevering. adjusted pipe buffer params for FTP OpenInputSTream. URI dispatching had aggrivated this bug. Now file downloads via FTP work. --- netwerk/protocol/ftp/src/nsFTPChannel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/netwerk/protocol/ftp/src/nsFTPChannel.cpp b/netwerk/protocol/ftp/src/nsFTPChannel.cpp index 55fffc4da21..25dc4b115ef 100644 --- a/netwerk/protocol/ftp/src/nsFTPChannel.cpp +++ b/netwerk/protocol/ftp/src/nsFTPChannel.cpp @@ -189,6 +189,9 @@ nsFTPChannel::GetURI(nsIURI * *aURL) return NS_OK; } +#define NS_FTP_SEGMENT_SIZE (2*1024) +#define NS_FTP_BUFFER_SIZE (8*1024) + NS_IMETHODIMP nsFTPChannel::OpenInputStream(PRUint32 startPosition, PRInt32 readCount, nsIInputStream **_retval) @@ -206,7 +209,7 @@ nsFTPChannel::OpenInputStream(PRUint32 startPosition, PRInt32 readCount, nsCOMPtr bufOutStream; nsCOMPtr bufInStream; rv = NS_NewPipe(getter_AddRefs(bufInStream), getter_AddRefs(bufOutStream), - nsnull, mBufferSegmentSize, mBufferMaxSize); + nsnull, NS_FTP_SEGMENT_SIZE, NS_FTP_BUFFER_SIZE); if (NS_FAILED(rv)) return rv; *_retval = NS_STATIC_CAST(nsIInputStream*, bufInStream.get());