gnutls hadshake fails on http to https redirection
$ rm -f ~/.wget-*
$ wget2 -d facebook.com
31.185141.496 Local URI encoding = 'UTF-8'
31.185141.496 Input URI encoding = 'UTF-8'
31.185141.496 Fetched HSTS data from '/home/rootkea/.wget-hsts'
31.185141.496 Fetched HPKP data from '/home/rootkea/.wget-hpkp'
31.185141.496 Fetched TLS session data from '/home/rootkea/.wget-session'
31.185141.496 Fetched OCSP hosts from '/home/rootkea/.wget-ocsp_hosts'
31.185141.496 Fetched OCSP fingerprints from '/home/rootkea/.wget-ocsp'
31.185141.496 *url = facebook.com
31.185141.496 local filename = 'index.html'
31.185141.496 host_add_job: job fname index.html
31.185141.496 host_add_job: 0x60900000d6f0 facebook.com
31.185141.496 host_add_job: qsize 1 host-qsize=1
31.185141.496 queue_size: qsize=1
31.185141.496 queue_size: qsize=1
31.185141.497 queue_size: qsize=1
31.185141.497 [0] action=1 pending=0 host=0x0
31.185141.497 qsize=1 blocked=0
31.185141.497 pause=-1501507301497
31.185141.497 dequeue job facebook.com
31.185141.497 resolving facebook.com:80...
31.185141.506 has 31.13.78.35:80
31.185141.506 has 2a03:2880:f126:83:face:b00c:0:25de:80
31.185141.506 Add dns cache entry facebook.com
31.185141.506 trying 31.13.78.35:80...
31.185141.507 established connection facebook.com
[0] Downloading 'facebook.com' ...
31.185141.507 cookie_create_request_header for host=facebook.com path=(null)
31.185141.564 # sent 213 bytes:
GET / HTTP/1.1
Host: facebook.com
Accept-Encoding: gzip, deflate, bzip2, xz, lzma, br
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: wget2/1.0.0
Connection: keep-alive
31.185141.564 [0] action=2 pending=1 host=0x60400000db80
31.185141.564 ### req 0x61400000fe00 pending requests = 1
31.185141.822 nbytes 274 nread 0 102400
31.185141.822 # got header 270 bytes:
HTTP/1.1 301 Moved Permanently
Location: https://facebook.com/
Content-Type: text/html
X-FB-Debug: 2Nuu6NTDPhyhVkIm78oHWOlKVm162SU+6+D4JKW9kKDiOcw6EpO6f07Y+JsDwfNsDs5XX8ob55Cuc0r0H8Lr/w==
Date: Mon, 31 Jul 2017 13:21:41 GMT
Connection: keep-alive
Content-Length: 0
HTTP response 301 Moved Permanently [facebook.com]
31.185141.822 keep_alive=1
31.185141.822 *url = https://facebook.com/
31.185141.822 *3 https://facebook.com/
31.185141.822 host_add_job: job fname index.html
31.185141.822 host_add_job: 0x609000008f80 https://facebook.com/
31.185141.822 host_add_job: qsize 2 host-qsize=1
31.185141.822 host_remove_job: 0x60900000d6f0
31.185141.822 host_remove_job: qsize=1 host->qsize=0
31.185141.822 [0] action=1 pending=0 host=0x60400000db80
31.185141.822 qsize=0 blocked=0
31.185141.822 pause=-1501507301822
31.185141.822 closing connection
31.185141.822 [0] action=1 pending=0 host=0x0
31.185141.822 qsize=1 blocked=0
31.185141.822 pause=-1501507301822
31.185141.822 dequeue job https://facebook.com/
31.185141.822 main: wake up
31.185141.822 Found dns cache entry #0
31.185141.822 queue_size: qsize=1
31.185141.822 trying 31.13.78.35:80...
31.185141.822 GnuTLS init
31.185141.865 Certificates loaded: 168
31.185141.865 GnuTLS init done
31.185141.865 TLS False Start requested
31.185141.865 ALPN offering h2
31.185141.865 ALPN offering http/1.1
31.185141.979 gnutls_handshake: (-15) An unexpected TLS packet was received.
31.185141.980 TLS False Start: off
31.185141.980 GnuTLS: Get ALPN: The requested data were not available.
----
Unsupported authentication -1.
----
Key Exchange: (null)
Protocol: TLS1.2
Certificate Type: X.509
Compression: NULL
Cipher: NULL
MAC: MAC-NULL
----
31.185141.980 trying 2a03:2880:f126:83:face:b00c:0:25de:80...
31.185141.980 TLS False Start requested
31.185141.980 ALPN offering h2
31.185141.980 ALPN offering http/1.1
31.185141.981 gnutls_handshake: (-53) Error in the push function.
31.185141.981 TLS False Start: off
31.185141.981 GnuTLS: Get ALPN: The requested data were not available.
----
Unsupported authentication -1.
----
Key Exchange: (null)
Protocol: TLS1.2
Certificate Type: X.509
Compression: NULL
Cipher: NULL
MAC: MAC-NULL
----
31.185141.981 closing connection
31.185141.981 Failed to connect (-5)
31.185141.981 host_final_failure: qsize=0
31.185141.981 host_increase_failure: facebook.com failures=1
31.185141.981 [0] action=3 pending=1 host=0x60400000b9c0
31.185141.981 released job https://facebook.com/
31.185141.981 [0] action=1 pending=0 host=0x0
31.185141.981 qsize=1 blocked=1
31.185141.981 qsize=0 blocked=0
31.185141.981 pause=-1501507301981
31.185141.981 main: wake up
31.185141.981 main: done
31.185141.982 Successfully updated '/home/rootkea/.wget-ocsp_hosts'.
31.185141.982 Saved OCSP hosts to '/home/rootkea/.wget-ocsp_hosts'
31.185141.982 Successfully updated '/home/rootkea/.wget-ocsp'.
31.185141.982 Saved OCSP fingerprints to '/home/rootkea/.wget-ocsp'
31.185141.982 blacklist https://facebook.com/
31.185141.982 blacklist facebook.com
Edited by Avinash Sonawane