Increase default buffer size for wxWebRequest operations
Use 64KiB rather than 8KiB, as the latter seems rather small nowadays. Also add a symbolic constant for this number.
This commit is contained in:
@@ -18,6 +18,9 @@
|
||||
|
||||
WX_DECLARE_STRING_HASH_MAP(wxString, wxWebRequestHeaderMap);
|
||||
|
||||
// Default buffer size when a fixed-size buffer must be used.
|
||||
const int wxWEBREQUEST_BUFFER_SIZE = 64 * 1024;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxWebAuthChallengeImpl
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -509,7 +509,7 @@ wxWebAuthChallenge::SetCredentials(const wxWebCredentials& cred)
|
||||
|
||||
wxWebResponseImpl::wxWebResponseImpl(wxWebRequestImpl& request) :
|
||||
m_request(request),
|
||||
m_readSize(8 * 1024)
|
||||
m_readSize(wxWEBREQUEST_BUFFER_SIZE)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -194,7 +194,7 @@ wxWebRequestWinHTTP::HandleCallback(DWORD dwInternetStatus,
|
||||
|
||||
void wxWebRequestWinHTTP::WriteData()
|
||||
{
|
||||
int dataWriteSize = 8 * 1024;
|
||||
int dataWriteSize = wxWEBREQUEST_BUFFER_SIZE;
|
||||
if ( m_dataWritten + dataWriteSize > m_dataSize )
|
||||
dataWriteSize = m_dataSize - m_dataWritten;
|
||||
if ( !dataWriteSize )
|
||||
|
Reference in New Issue
Block a user