You are not logged in.
Pages: 1
ab,
i post a 350M file separately to two servers, server with windows 10 works fine, but client got Http Error 406 message from server with windows server 2003.
is it about default file size limitation?
thanks.
Offline
i found that Http.ReceiveRequestEntityBody got 1450 result.
Last edited by profh (2015-10-25 07:30:30)
Offline
it works after i modify the code of THttpApiServer.Execute in SynCrtSock.pas:
from:
Err := Http.ReceiveRequestEntityBody(fReqQueue,Req^.RequestId,flags,
BufRead,InContentLength-InContentLengthRead,BytesRead);
to:
Err := Http.ReceiveRequestEntityBody(fReqQueue,Req^.RequestId,flags,
BufRead,2048,BytesRead);
and i can upload file more than 1024M now.
Offline
Thanks you I've just come across the same problem. The buffer shouldn't need to be the same size as the content since the reading part is already being done in a loop. Setting the buffer too large (around 20MB in my case) will throw an ERROR_NO_SYSTEM_RESOURCES (1450) exception.
More info:
Offline
I've introduced ReceiveBufferSize property to avoid Http Error 406 when serving huge files in THttpApiServer.Execute.
By default, the value is 1MB, which should be fine in most cases.
See http://synopse.info/fossil/info/bf9d307be4
Online
awesome.
Offline
Pages: 1