0

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.

4
  • Get the Firefox extension "Live HTTP Headers". Post the logs for the request(s) and the logs on Nginx (access/error). With that extension you may be able to work it out yourself.
    – Tim
    Apr 23, 2016 at 19:56
  • @Tim thanks, the extension is good to show the problem. As I mentioned in the question the access and error log don't show a request, which is supported by the extension. It just shows #request# POST https://test.craftandbuild.de/post.php but no actual request on shift F5
    – zuim
    Apr 23, 2016 at 20:05
  • When I record a normal reload (ctrl+r/F5) the addon records it, but when I try to replay it the same error occurs.
    – zuim
    Apr 23, 2016 at 20:11
  • Sounds like a firefox problem, not an nginx problem, given it's not sending a request.
    – Tim
    Apr 23, 2016 at 21:44

0

You must log in to answer this question.

Browse other questions tagged .