Skip to content

Commit

Permalink
Merge pull request #533 from towards-a-new-leftypol/master
Browse files Browse the repository at this point in the history
Add managerSetMaxHeaderLength to Client interface
  • Loading branch information
snoyberg committed Mar 20, 2024
2 parents a1c5e34 + b6270d2 commit 6f742e8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions http-client/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog for http-client

## 0.7.17

* Add `managerSetMaxHeaderLength` to `Client` to change `ManagerSettings` `MaxHeaderLength`.

## 0.7.16

* Add `responseEarlyHints` field to `Response`, containing a list of all HTTP 103 Early Hints headers received from the server.
Expand Down
6 changes: 6 additions & 0 deletions http-client/Network/HTTP/Client.hs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ module Network.HTTP.Client
, managerSetProxy
, managerSetInsecureProxy
, managerSetSecureProxy
, managerSetMaxHeaderLength
, ProxyOverride
, proxyFromRequest
, noProxy
Expand Down Expand Up @@ -320,6 +321,11 @@ managerSetSecureProxy po m = m { managerProxySecure = po }
managerSetProxy :: ProxyOverride -> ManagerSettings -> ManagerSettings
managerSetProxy po = managerSetInsecureProxy po . managerSetSecureProxy po

-- @since 0.7.17
managerSetMaxHeaderLength :: Int -> ManagerSettings -> ManagerSettings
managerSetMaxHeaderLength l manager = manager
{ managerMaxHeaderLength = Just $ MaxHeaderLength l }

-- $example1
-- = Example Usage
--
Expand Down
2 changes: 1 addition & 1 deletion http-client/http-client.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: http-client
version: 0.7.16
version: 0.7.17
synopsis: An HTTP client engine
description: Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/http-client>.
homepage: https://github.com/snoyberg/http-client
Expand Down

0 comments on commit 6f742e8

Please sign in to comment.