[Lazarus] CGI Response.ContentStream client break

Leonardo M. Ramé l.rame at griensu.com
Fri Jul 4 14:17:28 CEST 2014


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!.

Regards,
-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com




More information about the Lazarus mailing list