Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customizing max header length #514

Merged
merged 10 commits into from
Aug 21, 2023

Conversation

tfausak
Copy link
Contributor

@tfausak tfausak commented Aug 15, 2023

Fixes #502.

I'm not sure if this is the right way to add this customization. I turned the constant into a parameter and then just kept adding parameters until the compiler was happy. Then I pushed the configuration into the Manager since that felt like the right place to put it.

Some of the function signatures could be cleaner if this configuration was contained in the Connection, but that didn't feel like the right place for this — for whatever reason. Also I have no idea how important it is to have a stable API for these functions. As a user of http-client, I basically only ever use newManager and httpLbs.

I'm very much open to feedback here! Please let me know if I can change anything to make this easier to merge.

Copy link
Owner

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I left a comment about adding some version bumps, but I'll handle that after merging. Thanks!

@@ -879,3 +882,9 @@ data StreamFileStatus = StreamFileStatus
, thisChunkSize :: Int
}
deriving (Eq, Show, Ord, T.Typeable)

-- | The maximum header size in bytes.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a @since comment here? And to go along with that: can you add a minor version bump in the cabal file and a changelog entry?

@snoyberg snoyberg merged commit dbd5bef into snoyberg:master Aug 21, 2023
12 of 15 checks passed
snoyberg added a commit that referenced this pull request Aug 21, 2023
@tfausak
Copy link
Contributor Author

tfausak commented Aug 22, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow disabling or customizing value max header value length that raises OverlongHeaders exception
2 participants