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: Use HttpRequest authority instead of host #6879

Merged
merged 4 commits into from
Apr 5, 2024

Conversation

usmansaleem
Copy link
Member

@usmansaleem usmansaleem commented Apr 4, 2024

PR description

fix: Use HttpRequest authority instead of host.

  • Use authority method to determine the host name from header instead of using deprecated host method
  • Fix WebSocketService unit test

Fixed Issue(s)

Fixes #6878

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

 Use authority method to determine the host name from header instead of using deprecated host method

Signed-off-by: Usman Saleem <usman@usmans.info>
Signed-off-by: Usman Saleem <usman@usmans.info>
@usmansaleem usmansaleem requested review from shemnon and macfarla April 4, 2024 00:19
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

changelog entry?

Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

it is much simpler!

});
});
testContext.awaitCompletion(VERTX_AWAIT_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
assertThat(testContext.awaitCompletion(VERTX_AWAIT_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS))
.isTrue();
Copy link
Contributor

Choose a reason for hiding this comment

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

@usmansaleem is this what you mean by the test needing fixing? there was no assertion before?

Copy link
Member Author

@usmansaleem usmansaleem Apr 4, 2024

Choose a reason for hiding this comment

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

@macfarla correct, from L220 to L232 as well.

Signed-off-by: Usman Saleem <usman@usmans.info>
@usmansaleem usmansaleem requested a review from macfarla April 4, 2024 04:06
Copy link
Contributor

@jflo jflo left a comment

Choose a reason for hiding this comment

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

better exception handling and much less copypasta!

Signed-off-by: Usman Saleem <usman@usmans.info>
@usmansaleem usmansaleem enabled auto-merge (squash) April 5, 2024 00:40
@usmansaleem usmansaleem merged commit 80c6c04 into hyperledger:main Apr 5, 2024
42 checks passed
@usmansaleem usmansaleem deleted the use_authority_method branch April 5, 2024 01:26
amsmota pushed a commit to Citi/besu that referenced this pull request Apr 16, 2024
Use HttpRequest authority method to determine the hostname from header instead of using deprecated host method

Signed-off-by: Usman Saleem <usman@usmans.info>
Signed-off-by: amsmota <antonio.mota@citi.com>
amsmota pushed a commit to Citi/besu that referenced this pull request Apr 16, 2024
Use HttpRequest authority method to determine the hostname from header instead of using deprecated host method

Signed-off-by: Usman Saleem <usman@usmans.info>
Signed-off-by: amsmota <antonio.mota@citi.com>
macfarla pushed a commit to macfarla/besu that referenced this pull request Apr 26, 2024
Use HttpRequest authority method to determine the hostname from header instead of using deprecated host method

Signed-off-by: Usman Saleem <usman@usmans.info>
matthew1001 pushed a commit to kaleido-io/besu that referenced this pull request Jun 7, 2024
Use HttpRequest authority method to determine the hostname from header instead of using deprecated host method

Signed-off-by: Usman Saleem <usman@usmans.info>
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.

Use authority() instead of deprecated host() method in "allow list"
3 participants