Remove dependency on httpcomponents.core5
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 15/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- java
調査の方向性
Start with the affected imports listed in the issue, especially BasicURLNormalizer, then inspect core/pom.xml, the root pom.xml, the archetype shade configuration, and the “Migrating to 4.0.0” docs. The issue specifies the constants and query-string behavior to preserve; review the listed main and test files across core, tika, and warc. Done means removing the dependency and exclusion, preserving query output, and documenting the migration; linked pull request #2270 is already open.
索引モデルが issue の本文から書いたものです。
説明
See discussion on https://github.com/apache/stormcrawler/pull/2236/#issuecomment-6250049212
Context
After #2211, core depends only on org.apache.httpcomponents.core5:httpcore5. It uses it for HTTP header and status constants and for query-string parsing in BasicURLNormalizer. A whole library for that is not worth the dependency, and HttpComponents types in our code mean we can't change these classes in a 4.x minor release without breaking user code. 4.0.0 is the time to remove it.
What's affected
1. HttpHeaders constants
- Main code:
FeedParserBolt,JSoupParserBolt,SimpleFetcherBolt,SiteMapParserBolt,FetchOutcomes,AdaptiveScheduler,HttpRobotRulesParser,FileResponse, okhttpHttpProtocol,CharsetIdentification, plusParserBolt(tika) andWARCRecordFormat(warc). - Tests:
FeedParserBoltTest,JSoupParserBoltTest,SiteMapParserBoltTest,AdaptiveSchedulerTest,CharsetIdentificationTest, plus the tika and warc tests. - Constants used:
ACCEPT,ACCEPT_LANGUAGE,AUTHORIZATION,CONTENT_LENGTH,CONTENT_TYPE,ETAG,IF_MODIFIED_SINCE,IF_NONE_MATCH,LAST_MODIFIED,LOCATION,PROXY_AUTHORIZATION,USER_AGENT.
2. HttpStatus constants
- Used in
FileResponse. - Constants used:
SC_OK,SC_MULTIPLE_CHOICES,SC_BAD_REQUEST,SC_UNAUTHORIZED,SC_FORBIDDEN,SC_NOT_FOUND,SC_METHOD_FAILURE,SC_INTERNAL_SERVER_ERROR.
3. NameValuePair and URLEncodedUtils in BasicURLNormalizer
- These sort the query parameters and remove the filtered ones.
- The code calls
URLEncodedUtils.parse(query, UTF_8, '&', ';')andURLEncodedUtils.format(pairs, UTF_8). That class is deprecated in httpcore5.
Actions
- Add StormCrawler-owned
HttpHeadersandHttpStatusclasses in core, for example underorg.apache.stormcrawler.protocol. Each holds the constants listed above as plainpublic static finalfields, with the same names and values as HttpCore 5. Switching to them is then an import change only. - Update all the imports above in core, tika and warc, main and test code.
- Replace
URLEncodedUtilsandNameValuePairinBasicURLNormalizerwith a small in-house parser and formatter. The output must stay exactly the same. - Remove
httpcore5fromcore/pom.xml, and thehttpcore5.versionproperty from the rootpom.xmlif nothing else uses it. - Remove the leftover
<exclude>org/apache/http/**</exclude>from the archetype's shade configuration. - Update the "Migrating to 4.0.0" docs. Core no longer brings in any HttpComponents classes, so users who relied on them transitively must declare the dependency themselves.
- 主要言語
- Java
- スター
- 1k
- フォーク
- 295
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 62
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/stormcrawler のほかの issue
-
URLNormalizer The query is split on `;` as well as `&`, which rewrites URLs対応中かも @jnioche が 27 日前に担当しました。 オープンbug
apache/stormcrawler#2199 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Bug report] BasicURLNormalizer unmangleQueryString inserts a second `?` when a query value contains a `/`対応中かも @jnioche が 27 日前に担当しました。 オープンbug core
apache/stormcrawler#2198 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
apache/stormcrawler#2131 ·
メンテナーはふだん 1 日以内に返信
-
[Improvement] Work towards Maven 4 Compatibility対応中かも @mvolikas が 351 日前に担当しました。 オープンgood first issue help wanted
apache/stormcrawler#1662 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Delete redirected pages再び着手できるかも @tomatotomata が 84 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンcore good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
apache/stormcrawler#994 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
apache/stormcrawler の issue をすべて見る
似ている issue
-
pdfium-drift
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Stirling-Tools/JPDFium#188 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
openremote/openremote#3487 · コメント 1 件 ·
-
Type/Bug U2
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
wso2/product-is#28675 ·
メンテナーはふだん 1 日以内に返信
-
a:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信