[Lazarus] CGI Response.ContentStream client break

Michael Van Canneyt michael at freepascal.org
Fri Jul 4 17:21:10 CEST 2014



On Fri, 4 Jul 2014, Leonardo M. Ramé wrote:

> On 2014-07-04 08:22:30 +0200, Michael Van Canneyt wrote:
>>
>>
>> On Thu, 3 Jul 2014, silvioprog wrote:
>>
>>> 2014-07-03 17:33 GMT-03:00 Leonardo M. Ramé <l.rame at griensu.com>:
>>> [...]
>>>      Mmm, no, too fast.
>>>
>>>      Maybe the problem is on the client side. I'm using Synapse library as
>>>      client, and I'm issuing THttpSend's Abort method to stop downloading.
>>>
>>>
>>> You can change your 'broker' to a embedded HTTP server, and put a break point and debug both (client/server).
>>>  
>>>      Is the cgi notified when the client does an Abort call?.
>>>
>>>
>>> Hm... AFAIK, no.
>>
>> Indeed. The CGI program is just terminated.
>>
>> Normally the file stream is then closed by the OS, so this should not have any side effects.
>> (unless the OS is buggy).
>>
>> If you do observe side effects, try opening the file without share locks.
>> using flags (fmOpenRead or fmShareDenyNone), I think.
>>
>> Michael.
>
> Thanks Michael, using (fmOpenRead or fmShareDenyNone) params did the
> trick!.

On what platform did you get this ?

Michael


More information about the Lazarus mailing list