ie_ssl.txt 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. Internet Explorer and SSL
  2. Luke Ehresman <luke@squirrelmail.org>
  3. =====================================
  4. I've just spent the last few days trying to track down the now famous bug
  5. with IE and SSL. The problem lies in the fact that PHP sends some no-cache
  6. headers whenever a session is started. IE chokes when trying to download a
  7. file that it can't cache over SSL. We use session management to store many
  8. things, one being the key to decypher the password.
  9. Once we had figured out that it was sessions in PHP that was causing the
  10. problem, we tried turning the session management off in the download script
  11. in Squirrelmail. This introduced another problem for us because we NEEDED
  12. sessions to decypher the key so we could log into the IMAP server and
  13. download the attachment.
  14. Next we tried leaving the sessions turned off, but passed the key in through
  15. a GET parameter. This worked, but is obviously not a very secure way of
  16. handling things.
  17. Our quest continued for a good solution. Finally, I was browsing through
  18. the source of PHP, I noticed the 2 headers it was sending were "Pragma" and
  19. "Cache-Control". I had the crazy idea of defining these again after the
  20. session had been started, and lo and behold, it worked! Below is the code
  21. that made this work:
  22. session_start()
  23. header("Pragma: ");
  24. header("Cache-Control: cache");
  25. With all the testing I have done, this works, and works very well for all
  26. browsers.
  27. This was submitted by Marcin Jessa <yazzy@yazzy.org>
  28. ====================================================
  29. Reading INSTALL file of SqWebMail i found following note:
  30. Tweak the web server for MSIE
  31. The MSIE browser has a number of bugs in its HTTP/1.1 implementation,
  32. at least as of MSIE 4.x and 5.x. You must configure your web server to
  33. use HTTP/1.0 when talking to any MSIE browser (at least until MSIE
  34. gets fixed). The problem has to do with downloading attachments.
  35. Apparently, MSIE forgets how MIME works, when it uses HTTP/1.1. For
  36. the Apache server, insert the following directive in httpd.conf:
  37. BrowserMatch "MSIE" nokeepalive downgrade-1.0 force-response-1.0
  38. Recent versions of Apache already have a similar directive for a
  39. specific version of MSIE, MSIE 4.0b2. Just replace it with a
  40. browsermatch for any MSIE version.