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

Request body is preserved across 'next' calls #147 #308

Merged
merged 8 commits into from Sep 27, 2023

Conversation

ocramz
Copy link
Collaborator

@ocramz ocramz commented Sep 25, 2023

  1. added test case to confirm issue is still there
  2. adapted patch by @thomasjm https://github.com/scotty-web/scotty/pull/206/files to handle max body size parameter
  3. clarify imports in a few places

@ocramz ocramz changed the title WIP fixing "next eats up the body of a POST request" Request body is preserved across 'next' calls #147 Sep 26, 2023
@ocramz
Copy link
Collaborator Author

ocramz commented Sep 26, 2023

@RyanGlScott Hi, github suggested you as a reviewer :) the original bug (#147 ) is fixed, but CI fails due to an unrelated test: an exception raised by a too large request body is uncaught, which I find very puzzling since I didn't modify exception behaviour in this PR. Thanks for all pointers.

@@ -97,6 +97,14 @@ spec = do
it "returns 500 on exceptions" $ do
get "/" `shouldRespondWith` "<h1>500 Internal Server Error</h1>divide by zero" {matchStatus = 500}

describe "setMaxRequestBodySize" $ do
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

moved this test to appear under the "ScottyM" section

@ocramz ocramz merged commit eaafaee into scotty-web:master Sep 27, 2023
0 of 5 checks passed
@ocramz ocramz deleted the next-preserve-post-body-#147 branch September 27, 2023 07:02
@ocramz ocramz mentioned this pull request Dec 31, 2023
5 tasks
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.

None yet

1 participant