[fpc-pascal] CustHttpApp again, error: "Missing HTTP protocol version in request"
silvioprog
silvioprog at gmail.com
Fri Apr 25 15:05:14 CEST 2014
2014-04-25 3:39 GMT-03:00 Michael Van Canneyt <michael at freepascal.org>:
[...]
>
> Damn windows returning 0 on read... Can you please test with the following
> change:
>
>
> Procedure FillBuffer;
>
> Var
> R : Integer;
>
> begin
> SetLength(FBuffer,ReadBufLen);
> Repeat
> r:=FSocket.Read(FBuffer[1],ReadBufLen);
>
> If r<0 then
> Raise EHTTPServer.Create(SErrReadingSocket);
> if R=0 then
> Sleep(10);
> Until (R<>0);
> if (R<ReadBuflen) then
> SetLength(FBuffer,r);
> end;
After apply this change, now when read returns 0, it freezes the app.,
because the "sleep(10)" command is infinitely called. :/
Damn windows!
--
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140425/dee38791/attachment.html>
More information about the fpc-pascal
mailing list