following redirect fails when server closes connection unexpectedly
Submitted by Sander Hoentjen
Link to original bug (#770532)
Description
I have an issue with a strange kind of redirection. The webserver detects when a non-TLS connection is made to a TLS port, and reponds with a Location-header. It then seems to abruptly terminate the connection.
This works fine from a user-prespective in all the browsers I have tested: various (probably all) version of IE, Firefox, Chromium, Safari, elinks, curl. It doesn't work with epiphany.
Curl output:
~]$ curl -v -L http://141.138.169.214:2223/
- Trying 141.138.169.214...
- Connected to 141.138.169.214 (141.138.169.214) port 2223 (#0)
GET / HTTP/1.1 Host: 141.138.169.214:2223 User-Agent: curl/7.47.1 Accept: /
< HTTP/1.1 302 Found < Server: DirectAdmin Daemon v1.50.1 < Location: https://s214.webhostingserver.nl:2223 < x-use-https: yes < Content-type: text/html
- no chunk, no close, no size. Assume close to signal end <
- Closing connection 0
- Issue another request to this URL: 'https://s214.webhostingserver.nl:2223'
- Rebuilt URL to: https://s214.webhostingserver.nl:2223/
- Trying 141.138.169.214...
- Connected to s214.webhostingserver.nl (141.138.169.214) port 2223 (#1 (closed))
- Initializing NSS with certpath: sql:/etc/pki/nssdb
- CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none
- ALPN/NPN, server did not agree to a protocol
- SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- Server certificate:
- subject: CN=*.webhostingserver.nl,OU=EssentialSSL Wildcard,OU=Domain Control Validated
- start date: Jan 15 00:00:00 2015 GMT
- expire date: Feb 17 23:59:59 2018 GMT
- common name: *.webhostingserver.nl
- issuer: CN=COMODO RSA Domain Validation Secure Server CA,O=COMODO CA Limited,L=Salford,ST=Greater Manchester,C=GB
GET / HTTP/1.1 Host: s214.webhostingserver.nl:2223 User-Agent: curl/7.47.1 Accept: /
<html>
<head>
<snip>
< HTTP/1.1 200 OK
< Server: DirectAdmin Daemon v1.50.1 Registered to Antagonist
< Set-Cookie: session=; path=/; expires=Tue, 30 Aug 2016 07:54:24 GMT; secure; HttpOnly
< Connection: close
< Cache-Control: no-cache
< Pragma: no-cache
< X-DirectAdmin: unauthorized
< Content-Type: text/html
<
epiphany output on console:
~]$ epiphany
** (epiphany:13425): CRITICAL **: load_failed_cb: assertion '(error->domain == WEBKIT_NETWORK_ERROR) || (error->domain == WEBKIT_POLICY_ERROR) || (error->domain == WEBKIT_PLUGIN_ERROR)' failed
Version: 3.20.x (obsolete)