header("Content-type: image/png"); makes script run twice?
Pirata Nervo Offline
Member
***
Posts: 235
Joined: Jan 2008
Post: #5
RE: header("Content-type: image/png"); makes script run twice?
(06-23-2011 10:07 AM)ZiNgA BuRgA Wrote:  
(06-22-2011 08:53 PM)Pirata Nervo Wrote:  The script outputs the file once (not in multiple parts so it's limited to PHP's max post size). I'm not sure what you mean by early termination, once the file is sent to the user, the script has done its job.
But when it hasn't sent the file to the user?
Like if the user hits cancel? It's still considered as downloaded.

(06-23-2011 10:07 AM)ZiNgA BuRgA Wrote:  
(06-22-2011 08:53 PM)Pirata Nervo Wrote:  The first request is the one which has the fields: postcode, did, action and process. The second contains no fields at all thus we get the image for the first one and the MyDownloads index page for the second.
This is not normal behaviour.  A request to a file should be a single request and shouldn't start sending arbitrary additional requests.
Try a different browser.

My gut instinct would be that you have tweaked some Firefox settings or installed plugins to increase speed through parallel downloading or similar, which is causing >1 request to be sent.

I might try it without addons running but I believe this is a firefox issue with images being output this way. But I'll try it without addons to make sure it's _my_ problem.

Thanks for your help.
(This post was last modified: 06-23-2011 11:17 AM by Pirata Nervo.)
06-23-2011 11:17 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: header("Content-type: image/png"); makes script run twice? - Pirata Nervo - 06-23-2011 11:17 AM

 Standard Tools
Forum Jump: