www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Downs <ddo...@cpdevelopments.com>
Subject mod_isapi/9700: streaming an image to the browser doesn't correctly
Date Mon, 04 Feb 2002 00:08:07 GMT

>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
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Sun Feb 03 16:10:00 PST 2002
>Originator:     ddowns@cpdevelopments.com
>Release:        1.3.23 & 2.0.28
W2k Advanced Server SP2
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.
This is the code to handle the /GetChart action on the dll.

  MemStr : TMemoryStream;
  MemStr := GenerateChart;
  MemStr.Position := 0;
  Response.CustomHeaders.Add('Content-Disposition=; ' + 'filename="chart.jpg"');
  Response.ContentType := 'image/jpeg';
  Response.ContentLength := MemStr.Size;
  Response.ContentStream := MemStr;

I have tried a few different variations of this.

Original: //works under IIS5 and omniHTTPd
  Response.ContentType := 'image/jpeg';
  Response.ContentStream := GenerateChart;
Not as of yet.
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> 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!     ]

View raw message