Skip to content

Improve multipart limits test - #491

Merged
clue merged 1 commit into
reactphp:1.xfrom
WyriHaximus-labs:1.x-improve-multipart-limits-test
Apr 14, 2023
Merged

Improve multipart limits test#491
clue merged 1 commit into
reactphp:1.xfrom
WyriHaximus-labs:1.x-improve-multipart-limits-test

Conversation

@WyriHaximus

Copy link
Copy Markdown
Member

The PR introducing this test assumed time would be enough to accurately predict behavior. This commit changes it to using introspection to check the exact state of the parser and expected state once finished parsing a multipart request body. To accomplish that it was required to make the cursor in the file an object property, so it can be inspected using reflection.

@WyriHaximusWyriHaximus added this to the v1.9.0 milestone Mar 2, 2023
The PR introducing this test assumed time would be enough to accurately predict behavior. This commit changes it to using introspection to check the exact state of the parser and expected state once finished parsing a multipart request body. To accomplish that it was required to make the cursor in the file an object property, so it can be inspected using reflection.
@WyriHaximus
WyriHaximusforce-pushed the 1.x-improve-multipart-limits-test branch from b33cd9f to 2942434CompareMarch 2, 2023 15:55

@SimonFringsSimonFrings left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like that we're no longer dependent on the time measurement here 👍

@clueclue left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not exactly the most beautiful changeset, but it's an improvement over the previous version, so… :shipit: Thanks @WyriHaximus!

@clue
clue merged commit 5d2df79 into reactphp:1.xApr 14, 2023
@WyriHaximus

Copy link
Copy Markdown
MemberAuthor

Done worse and done better, not proud of it but gets the job done 🖖 .

@WyriHaximus
WyriHaximus deleted the 1.x-improve-multipart-limits-test branch April 16, 2023 19:49
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@WyriHaximus@clue@SimonFrings