in reply to Re^4: Should I just print my own HTTP headers?
in thread Should I just print my own HTTP headers?

Well, on the next day, you find out that you need to set up a cookie so you add that Set-Cookie line. Next day, you know you need some logic to determine whether to send PDF, a compressed file, a music or video file, or even some mime type of your very own creation. So, you struggle a bit to fit in the code. Then you're thinking..., Hey, do I have to send those bizard mime type files and let the browser displays at its will, or do I have to let the browser knows that the file is indeed for download? How do I state that again? Then after some reading you find out about Content-Disposition.

Oh, a few days later, you are asked to add a feature so your app is able to send the content in different languages based on some condition (the contents are ready, you are only asked to deliver them). So, you fixed those lines again and again. And I bet you will surely be very careful about those double EOLs.

Now, tell me, after you implement this with your own, and benchmark it again againsts the CGI.pm version of the same requirement. How much would you gain from the processing time advantage, would it be worth the implementation time?

Simple benchmark won't qualify for the real problem.

  • Comment on Re^5: Should I just print my own HTTP headers?

Replies are listed 'Best First'.
Re^6: Should I just print my own HTTP headers?
by Cap'n Steve (Friar) on Apr 13, 2007 at 02:37 UTC
    And then the next day I decide to automatically generate all of that, so I should use Image::Magick and PDF just to be safe, right?

    I'll just have to deal with my future multiple personalities when they start developing. Until then, I'd rather deal with the actual code instead of the theoretical.