Received: (qmail 46087 invoked by uid 501); 4 Feb 2002 00:08:07 -0000 Message-Id: <20020204000807.46086.qmail@apache.org> Date: 4 Feb 2002 00:08:07 -0000 From: Dan Downs Reply-To: ddowns@cpdevelopments.com To: submit@bugz.apache.org Subject: streaming an image to the browser doesn't correctly X-Send-Pr-Version: 3.110 >Number: 9700 >Category: mod_isapi >Synopsis: streaming an image to the browser doesn't correctly >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Sun Feb 03 16:10:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: ddowns@cpdevelopments.com >Release: 1.3.23 & 2.0.28 >Organization: apache >Environment: W2k Advanced Server SP2 >Description: I have a isapi dll created with Delphi 6 that generates a chart and streams it the browser. It works fine under OmniHTTPD and IIS5 but seems to hang a apache process. The process will use all leftover cpu time resulting in 100% cpu usage under task manager. I can run isapi dlls fine if they return text but it breaks when returning images. So far I've only tried to return jpegs. Under 1.3.23 it hangs a single apache process. Under 2.0.28 it shows the image for the first request then hangs a single process. >How-To-Repeat: This is the code to handle the /GetChart action on the dll. var MemStr : TMemoryStream; begin MemStr := GenerateChart; MemStr.Position := 0; Response.CustomHeaders.Add('Content-Disposition=; ' + 'filename="chart.jpg"'); Response.ContentType := 'image/jpeg'; Response.ContentLength := MemStr.Size; Response.ContentStream := MemStr; Response.SendResponse; end; I have tried a few different variations of this. Original: //works under IIS5 and omniHTTPd Response.ContentType := 'image/jpeg'; Response.ContentStream := GenerateChart; Response.SendResponse; >Fix: Not as of yet. >Release-Note: >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]