Re: [twsocket] Fix for THttpCli
Hello Yuri, >> Fix for THttpCli. >> >> Bug: >> If we request THttpCli.Abort in OnDocData, after abort >> FReceiveLen<-1 (Must 0). New request (THttpCli.Get) raise exception >> "Access violation" Thanks for the report. I was able to reproduce and just checked in a fix, see svn revision #623. Should be also available tomorrow in the zipped daily snapshot. http://wiki.overbyte.be/wiki/index.php/ICS_Download -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Fix for THttpCli (decode page when TransferEncoding=chunked).
Yuri Semenov wrote: > Hello. Patch - http://www.avsave.ru/chunked_fix.patch Thanks! I was able to reproduce the problem and your code fixed it. Added your changes to the V7-repository. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Fix for THttpCli (decode page when TransferEncoding =chunked).
Hello. Patch - http://www.avsave.ru/chunked_fix.patch 2010/2/14 Arno Garrels > Hello Yuri, > > I do not understand what you actually changed in unit > OverbyteIcsHttpProt.pas. > Please post a diff/patch file from latest SVN source. > From the Tortoise context menu it's easy, just use "Create a Patch". > > -- > Arno Garrels > > > > Hi. Sorry for my English. I fix some problems with decode page (with > > active httpoEnableContentCoding) - no result after decode or timeout > > error when TransferEncoding = 'chunked' (example - http://rutube.ru/ , > > http://bash.org.ru/ and some other), but with 'gzip all fine'. This > > problem i see in last version from svn for D2009. > > > > This fix problem with no result when TransferEncoding = 'chunked': > > > > > OverbyteIcsHttpProt.pas > > > > procedure THttpCli.GetBodyLineNext; > > ... > > if FTransferEncoding = 'chunked' then begin > > ... > > if FChunkState = httpChunkDone then begin > > ... > > {$IFDEF UseBandwidthControl} > > if (httpoBandwidthControl in FOptions) and Assigned(FBandwidthTimer) > > then FBandwidthTimer.Enabled := FALSE; > > {$ENDIF} > > <-- LOST CODE ---> > > {$IFDEF UseContentCoding} > > FContentCodingHnd.Complete; > > {$IFNDEF NO_DEBUG_LOG} > > if CheckLogOptions(loProtSpecInfo) then begin > > if Assigned(FRcvdStream) and (FContentEncoding <> '') then begin > > DebugLog(loProtSpecInfo, FContentEncoding + ' content uncompressed > > from ' + IntToStr(FContentLength) + ' bytes to ' + > > IntToStr(FRcvdStream.Size) + ' bytes'); > > end; > > end; > > {$ENDIF} > > {$ENDIF} > > <--- LOST CODE --> > > > > ... > > > > > But after loading some page i have always timeout error, next fix: > > > > OverbyteIcsHttpCCodZLib.pas > > > > Add > > BackObj.ProgressCallback := nil; > > in procedure > > procedure THttpCCodzlib.Complete; > > (after some loading page BackObj not nulled after initialization, and > > Assigned(BackObj.ProgressCallback) passed with not assigned callback, > > this raise exception) > > > > > Best regards, Yuri. > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Fix for THttpCli (decode page when TransferEncoding =chunked).
Hello Yuri, I do not understand what you actually changed in unit OverbyteIcsHttpProt.pas. Please post a diff/patch file from latest SVN source. >From the Tortoise context menu it's easy, just use "Create a Patch". -- Arno Garrels > Hi. Sorry for my English. I fix some problems with decode page (with > active httpoEnableContentCoding) - no result after decode or timeout > error when TransferEncoding = 'chunked' (example - http://rutube.ru/ , > http://bash.org.ru/ and some other), but with 'gzip all fine'. This > problem i see in last version from svn for D2009. > > This fix problem with no result when TransferEncoding = 'chunked': > > OverbyteIcsHttpProt.pas > > procedure THttpCli.GetBodyLineNext; > ... > if FTransferEncoding = 'chunked' then begin > ... > if FChunkState = httpChunkDone then begin > ... > {$IFDEF UseBandwidthControl} > if (httpoBandwidthControl in FOptions) and Assigned(FBandwidthTimer) > then FBandwidthTimer.Enabled := FALSE; > {$ENDIF} > <-- LOST CODE ---> > {$IFDEF UseContentCoding} > FContentCodingHnd.Complete; > {$IFNDEF NO_DEBUG_LOG} > if CheckLogOptions(loProtSpecInfo) then begin > if Assigned(FRcvdStream) and (FContentEncoding <> '') then begin > DebugLog(loProtSpecInfo, FContentEncoding + ' content uncompressed > from ' + IntToStr(FContentLength) + ' bytes to ' + > IntToStr(FRcvdStream.Size) + ' bytes'); > end; > end; > {$ENDIF} > {$ENDIF} > <--- LOST CODE --> > > ... > > But after loading some page i have always timeout error, next fix: > > OverbyteIcsHttpCCodZLib.pas > > Add > BackObj.ProgressCallback := nil; > in procedure > procedure THttpCCodzlib.Complete; > (after some loading page BackObj not nulled after initialization, and > Assigned(BackObj.ProgressCallback) passed with not assigned callback, > this raise exception) > > Best regards, Yuri. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be