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

Bug: Management endpoints require Content-Type header even if no request body needed #1040

Closed
nagyesta opened this issue Jun 28, 2024 · 4 comments
Assignees
Labels
bug Something isn't working community requested Issues requested by our community released Released, waiting for feedback

Comments

@nagyesta
Copy link
Owner

Describe the bug

All your endpoint require Content-Type to be set to 'application/json'. While swagger does this implicitely, you have to create a workaround for programmatic HttpClients (e.g. in C#, I have to add an empty StringContent to the body).
Normally, get and delete requests, don't need a body or this type of header.

To reproduce

Steps to reproduce the behavior:

  1. Use the app
  2. Access GET/DELETE endpoints of the management API

Expected behavior

Content-Type headers are not necessary when there is no required request body

Actual behavior

Content-Type headers are enforced to be set

The command you used

N/A

A minimal project that can be used to reproduce the issue

N/A

Environment

  • OS: Any
  • Version: <=2.4.42
  • Java version Any

Additional context

Reported by @JoeS-Bosch

@nagyesta nagyesta added the bug Something isn't working label Jun 28, 2024
@nagyesta nagyesta moved this from Ideas to Todo for next increment in Lowkey Vault Roadmap Jun 28, 2024
@nagyesta nagyesta self-assigned this Jun 28, 2024
@nagyesta nagyesta moved this from Todo for next increment to In progress in Lowkey Vault Roadmap Jun 28, 2024
nagyesta added a commit that referenced this issue Jun 28, 2024
…est body needed

- Removes Content-Type header requirement from GET and DELETE endpoints
- Updates tests

Updates #1040
{patch}

Signed-off-by: Esta Nagy <[email protected]>
nagyesta added a commit that referenced this issue Jun 28, 2024
…est body needed

- Removes Content-Type header requirement from GET and DELETE endpoints
- Updates tests

Updates #1040
{patch}

Signed-off-by: Esta Nagy <[email protected]>
nagyesta added a commit that referenced this issue Jun 28, 2024
…est body needed (#1042)

- Removes Content-Type header requirement from GET and DELETE endpoints
- Updates tests

Updates #1040
{patch}

Signed-off-by: Esta Nagy <[email protected]>
@nagyesta nagyesta added the community requested Issues requested by our community label Jun 28, 2024
@nagyesta
Copy link
Owner Author

Hi @JoeS-Bosch,
I think it should be fixed now. Please try with v2.4.54 and let me know how it went!
Thank you in advance!

@nagyesta nagyesta added the released Released, waiting for feedback label Jun 28, 2024
@nagyesta
Copy link
Owner Author

nagyesta commented Jul 5, 2024

Hi,
I assume, that this fix should resolve the original issue, so I am closing it. Please feel free to reopen in case it is still not working as intended!
Thank you again and best of luck!

@nagyesta nagyesta closed this as completed Jul 5, 2024
@github-project-automation github-project-automation bot moved this from In progress to Released in Lowkey Vault Roadmap Jul 5, 2024
@JoeS-Bosch
Copy link

Hi,
I was on vacation and could not check earlier.
I pulled the latest version (2.4.66) and the issue is fixed! Thanks for the quick response and action.

@nagyesta
Copy link
Owner Author

Hi,
thank you for letting me know! I am glad it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community requested Issues requested by our community released Released, waiting for feedback
Projects
Archived in project
Development

No branches or pull requests

2 participants