Skip to content

Commit

Permalink
Merge pull request #515 from kazu-yamamoto/tls-1.8
Browse files Browse the repository at this point in the history
catching up to tls 1.8.0
  • Loading branch information
snoyberg authored Aug 17, 2023
2 parents 43cbff2 + 73d1a4e commit 566e40f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions http-client-tls/Network/HTTP/Client/TLS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,19 @@ mkManagerSettingsContext' set mcontext tls sockHTTP sockHTTPS = set
, managerRetryableException = \e ->
case () of
()
#if MIN_VERSION_tls(1,8,0)
| ((fromException e)::(Maybe TLS.TLSException))==Just (TLS.PostHandshake TLS.Error_EOF) -> True
#else
| ((fromException e)::(Maybe TLS.TLSError))==Just TLS.Error_EOF -> True
#endif
| otherwise -> managerRetryableException defaultManagerSettings e
, managerWrapException = \req ->
let wrapper se
| Just (_ :: IOException) <- fromException se = se'
| Just (_ :: TLS.TLSException) <- fromException se = se'
#if !MIN_VERSION_tls(1,8,0)
| Just (_ :: TLS.TLSError) <- fromException se = se'
#endif
| Just (_ :: NC.LineTooLong) <- fromException se = se'
| Just (_ :: NC.HostNotResolved) <- fromException se = se'
| Just (_ :: NC.HostCannotConnect) <- fromException se = se'
Expand Down

0 comments on commit 566e40f

Please sign in to comment.