snoyberg / http-enumerator

HTTP client package with enumerator interface and HTTPS support.
27 stars 9 forks source link

"sendData: end of file" exception for https #44

Closed hvr closed 12 years ago

hvr commented 12 years ago

Yet again (had something similar with this particular site in #11 a while ago), performing a simple simpleHttp "https://t4a.box-world.org/" fails with an exception:

GHCi, version 7.2.2: http://www.haskell.org/ghc/  :? for help
...
Prelude> import Network.HTTP.Enumerator 
(0.08 secs, 32915624 bytes)
Prelude Network.HTTP.Enumerator> simpleHttp "https://t4a.box-world.org/"
Loading package filepath-1.2.0.1 ... linking ... done.
Loading package old-locale-1.0.0.3 ... linking ... done.
Loading package old-time-1.0.0.7 ... linking ... done.
Loading package unix-2.5.0.0 ... linking ... done.
Loading package directory-1.1.0.1 ... linking ... done.
Loading package time-1.2.0.5 ... linking ... done.
Loading package bytestring-0.9.2.0 ... linking ... done.
Loading package array-0.3.0.3 ... linking ... done.
Loading package deepseq-1.2.0.1 ... linking ... done.
Loading package containers-0.4.2.0 ... linking ... done.
Loading package text-0.11.1.9 ... linking ... done.
Loading package attoparsec-0.10.0.3 ... linking ... done.
Loading package transformers-0.2.2.0 ... linking ... done.
Loading package enumerator-0.4.16 ... linking ... done.
Loading package attoparsec-enumerator-0.3 ... linking ... done.
Loading package mtl-2.0.1.0 ... linking ... done.
Loading package asn1-data-0.6.1.1 ... linking ... done.
Loading package base64-bytestring-0.1.0.3 ... linking ... done.
Loading package blaze-builder-0.3.0.1 ... linking ... done.
Loading package blaze-builder-enumerator-0.2.0.3 ... linking ... done.
Loading package hashable-1.1.2.2 ... linking ... done.
Loading package case-insensitive-0.4 ... linking ... done.
Loading package cereal-0.3.4.0 ... linking ... done.
Loading package entropy-0.2.1 ... linking ... done.
Loading package largeword-1.0.1 ... linking ... done.
Loading package dlist-0.5 ... linking ... done.
Loading package data-default-0.3.0 ... linking ... done.
Loading package semigroups-0.8 ... linking ... done.
Loading package tagged-0.2.3.1 ... linking ... done.
Loading package crypto-api-0.8 ... linking ... done.
Loading package crypto-pubkey-types-0.1.0 ... linking ... done.
Loading package certificate-1.0.1 ... linking ... done.
Loading package primitive-0.4.0.1 ... linking ... done.
Loading package vector-0.9 ... linking ... done.
Loading package cryptocipher-0.3.0 ... linking ... done.
Loading package random-1.0.1.0 ... linking ... done.
Loading package cprng-aes-0.2.3 ... linking ... done.
Loading package failure-0.1.0.1 ... linking ... done.
Loading package http-types-0.6.7 ... linking ... done.
Loading package base-unicode-symbols-0.2.2.2 ... linking ... done.
Loading package monad-control-0.2.0.3 ... linking ... done.
Loading package parsec-3.1.2 ... linking ... done.
Loading package network-2.3.0.7 ... linking ... done.
Loading package cryptohash-0.7.4 ... linking ... done.
Loading package tls-0.8.3 ... linking ... done.
Loading package tls-extra-0.4.1 ... linking ... done.
Loading package utf8-string-0.3.7 ... linking ... done.
Loading package zlib-0.5.3.1 ... linking ... done.
Loading package zlib-bindings-0.0.1 ... linking ... done.
Loading package zlib-enum-0.2.1 ... linking ... done.
Loading package http-enumerator-0.7.1.7 ... linking ... done.
*** Exception: sendData: end of file
Prelude Network.HTTP.Enumerator> 
hvr commented 12 years ago

If this is of any help, something with the "TLS Client Key Exchange" packet originating from the client seems to upset the https server, as it's the last packet sent to the server before the server severs the connection with a tcp reset...

hvr commented 12 years ago

Something broke from tls-0.8.2 to tls-0.8.3, as I've just downgraded tls-0.8.2 where it seems to work properly

hvr commented 12 years ago

fyi, I've also filed a bug at https://github.com/vincenthz/hs-tls/issues/2

vincenthz commented 12 years ago

sorry about the breakage, i've fixed the hackage version for now (0.8.3.1 == 0.8.2), until i get to fix the tls package. the bug can be closed here for now (and i'll make sure it doesn't happen again too).