Skip to content

Conversation

@Pil0tXia
Copy link
Member

Fixes #4286.

Motivation

The response body is not recognised as JSON in Postman, and the Content-Type header missing:

image

image

Modifications

That's because NetUtils.sendSuccessResponseHeaders(httpExchange); is in front of httpExchange.getResponseHeaders().add(CONTENT_TYPE, APPLICATION_JSON); and headers are sent out before they are set correctly.

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Merging #4287 (5ebe5ee) into master (c18ef05) will increase coverage by 0.00%.
Report is 1 commits behind head on master.
The diff coverage is 0.00%.

❗ Current head 5ebe5ee differs from pull request most recent head 93f225d. Consider uploading reports for the commit 93f225d to get more accurate results

@@            Coverage Diff            @@
##             master    #4287   +/-   ##
=========================================
  Coverage     16.87%   16.87%           
- Complexity     1426     1427    +1     
=========================================
  Files           593      593           
  Lines         26068    26068           
  Branches       2396     2396           
=========================================
+ Hits           4398     4400    +2     
+ Misses        21229    21228    -1     
+ Partials        441      440    -1     
Files Changed Coverage Δ
...e/admin/handler/QueryWebHookConfigByIdHandler.java 26.66% <0.00%> (ø)
...ndler/QueryWebHookConfigByManufacturerHandler.java 28.57% <0.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@xwm1992 xwm1992 merged commit 6b8e5e6 into apache:master Jul 27, 2023
@Pil0tXia Pil0tXia deleted the pil0txia_bug_4286 branch January 4, 2024 05:12
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.

[Bug] The response body is not recognised as JSON in query WebHook config endpoints

3 participants