I have an nginx server which fails to correctly delive ssl, when a user presses ctrl+shift+r or ctrl+F5. These shortcuts reload the page and bypass the browser cache. It seems to work in Chrome and IE. To test this I used a html file with a form to create the post request.
I also minimized the server block:
#test
server
{
listen 443 ssl;
server_name example.com;
root /etc/nginx/html;
ssl_certificate /etc/letsencrypt/live/exapmple.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
location ~ \.php$
{
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
include fastcgi_params;
}
}
What I already tried:
- The access and error log show no request.
- The developer console shows only "connect" and "send", but not "wait" and "receive" in the timings overview
- It also only displays the request header.
- I'm using Firefox 46 on Windows 7
- The error only occurs with https
In case you want to try it I have uploaded an example with this form:
<form method="POST">
<input type="text" value="123" name="testname"/>
<input type="submit" value="GO"/>
</form>
There is no specific error, it only says "secure connection failed, the connection was reset while the page was loaded".
Working request recorded with Addon:
https://example.com/post.php
POST /post.php HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
DNT: 1
Referer: https://example.com/post.php
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 12
testname=123
HTTP/2.0 200 OK
Server: nginx
Date: Sat, 23 Apr 2016 20:18:41 GMT
Content-Type: text/html; charset=UTF-8
Vary: Accept-Encoding
Content-Encoding: gzip
X-Firefox-Spdy: h2
How can I prevent this error?
Solution: This seems to happen only on my device. So I assume it's a local bug and not the fault of the server.
#request# POST https://test.craftandbuild.de/post.php
but no actual request on shift F5