Opened 4 years ago
Closed 4 years ago
#1485926 closed Bugs (fixed)
Wrong headers in get.inc for nginx and IE 7
| Reported by: | harmaty | Owned by: | thomasb |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.3.1 |
| Component: | PHP backend | Version: | git-master |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Browser: Internet Explorer 7
HTTP-server: nginx
When I try to download attached archive I get alert:
"Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later."
In Firefox it works.
Change History (8)
comment:1 Changed 4 years ago by harmaty
comment:2 Changed 4 years ago by alec
- Milestone changed from later to 0.3-stable
comment:3 Changed 4 years ago by thomasb
In function send_nocacheing_headers() (rcube_shared.inc) we have
if (isset($_SERVER['HTTPS'])) {
header('Pragma: ');
header('Cache-Control: ');
}
Looks like nginx doesn't provide this property. Could you determine what variable we could check instead? Using $_SERVER['SERVER_PORT'] is not absolutely reliable.
comment:4 Changed 4 years ago by alec
I'm not a nginx guru, but it's possible to set $_SERVERHTTPS? in vhost config:
fastcgi_param HTTPS on;
comment:5 Changed 4 years ago by harmaty
Yes, if we add "fastcgi_param HTTPS on;" to nginx config, $_SERVERHTTPS? will appear.
Unfortunately, there are no other variables, except $_SERVERSERVER_PORT?, to detect the protocol
comment:6 Changed 4 years ago by alec
- Component changed from Core functionality to PHP backend
- Owner set to thomasb
So, a new config option or just a hint in INSTALL file? We're checking HTTPS variable also in iniset.php, so config option would be problematic. BTW, nginx is not listed in INSTALL file as supported server.
comment:7 Changed 4 years ago by alec
We've got also request for an option in #1485655
comment:8 Changed 4 years ago by alec
- Resolution set to fixed
- Status changed from new to closed
Added 'use_https' option in [161c28df].

forgot to say: protocol is HTTPS
I have added two headers in program/steps/mail/get.inc:
header('Pragma: '); header('Cache-Control: ');And now it works for all browsers.