incubator-stormcrawler icon indicating copy to clipboard operation
incubator-stormcrawler copied to clipboard

#1247 Fix race condition in HttpProtocol while having multiple proxy settings

Open chhsiao90 opened this issue 7 months ago • 6 comments

In HttpProtocol implementation, the client builder was singleton and may be accessed and modified by different threads at same time. The result is that a wrong proxy will be used or a wrong proxy auth will be configured.

To fix it, create a local builder insteand of having a field-level builder.

Fixes #1247

Thank you for contributing to Apache StormCrawler.

In order to streamline the review of the contribution we ask you to ensure the following steps have been taken:

For all changes:

  • [x] Is there a issue associated with this PR? Is it referenced in the commit message?

  • [x] Does your PR title start with #XXXX where XXXX is the issue number you are trying to resolve?

  • [x] Has your PR been rebased against the latest commit within the target branch (typically main)?

  • [x] Is your initial contribution a single, squashed commit?

  • [x] Is the code properly formatted with mvn git-code-format:format-code -Dgcf.globPattern="**/*" -Dskip.format.code=false?

For code changes:

  • [x] Have you ensured that the full suite of tests is executed via mvn clean verify?
  • [ ] Have you written or updated unit tests to verify your changes?
  • [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • [x] If applicable, have you updated the LICENSE file, including the main LICENSE file?
  • [x] If applicable, have you updated the NOTICE file, including the main NOTICE file?

Note:

Please ensure that once the PR is submitted, you check GitHub Actions for build issues and submit an update to your PR as soon as possible.

chhsiao90 avatar Jul 08 '24 05:07 chhsiao90