Skip to content

Conversation

tsegismont
Copy link
Contributor

@tsegismont tsegismont commented Jan 22, 2025

See #110

In some cases, users want to skip the proxied request or the backend response entirely. To do so, they can set a null Body in ProxyRequest or ProxyResponse.

However:

  • For ProxyRequest, it led to a NPE
  • For ProxyResponse, the content length was not overwritten if present

Also, in the test, we should make sure that the futures returned by context.sendRequest and context.sendResponse() are completed.

The completion signal is important because it helps users trigger cleanup actions (e.g. delete temp files)

See eclipse-vertx#110

In some cases, users want to skip the proxied request or the backend response entirely.
To do so, they can set a null Body in ProxyRequest or ProxyResponse.

However:

- For ProxyRequest, it led to a NPE
- For ProxyResponse, the content length was not overwritten if present

Signed-off-by: Thomas Segismont <[email protected]>
@tsegismont tsegismont merged commit de37cc1 into eclipse-vertx:main Jan 22, 2025
5 checks passed
@tsegismont tsegismont deleted the null-bodies branch January 22, 2025 12:52
@tsegismont tsegismont added this to the 5.0.0 milestone Jan 22, 2025
tsegismont added a commit to tsegismont/vertx-http-proxy that referenced this pull request Jan 22, 2025
…x#111)

See eclipse-vertx#110

In some cases, users want to skip the proxied request or the backend response entirely.
To do so, they can set a null Body in ProxyRequest or ProxyResponse.

However:

- For ProxyRequest, it led to a NPE
- For ProxyResponse, the content length was not overwritten if present

Signed-off-by: Thomas Segismont <[email protected]>
tsegismont added a commit that referenced this pull request Jan 22, 2025
See #110

In some cases, users want to skip the proxied request or the backend response entirely.
To do so, they can set a null Body in ProxyRequest or ProxyResponse.

However:

- For ProxyRequest, it led to a NPE
- For ProxyResponse, the content length was not overwritten if present

Signed-off-by: Thomas Segismont <[email protected]>
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.

1 participant