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

fix(parser): Don't read the body of a DELETE message #60

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

Conversation

DolceTriade
Copy link

Generally DELETE messages are treated like GET messages with different connotations, so this prevents client library flags from interfering with matching.

Summary

Generally DELETE messages are treated like GET messages with different connotations, so this prevents client library flags from interfering with matching.

Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows Conventional Commits standard
  • The code follows project code style standards
  • Tests have been added for this change

Type

  • Bugfix
  • Feature
  • Refactor
  • CI
  • Documentation
  • Other... Please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Does this PR add new third-party libraries? If yes, please explain why

  • Yes
  • No

Generally DELETE messages are treated like GET messages with different
connotations, so this prevents client library headers from interfering
with matching. Ideally, we'd be able to continue matching even if a
single matcher has an error.
Copy link

sonarcloud bot commented Nov 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@vitorsalgado
Copy link
Owner

@DolceTriade hey thanks for your contribution.
Sending a body in DELETE request does not seem to be forbid or discouraged by the spec. Did you find any issues mocking DELETE requests?

@DolceTriade
Copy link
Author

Yes, the issue was that DELETE tried to read the body of a request that had no body and crashed (or prevented it from matching the request).

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.

2 participants