Task 3.2: Migrate Commons HTTP Client
Open
Nobody has claimed this yet.
dotCMS : Technical Debt
Team : Platform
Type : Task
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Task Description
Replace dot.commons-httpclient with modern HTTP client (org.apache.httpcomponents:httpclient)
Status: 🔄 PENDING
Scope
- Analyze 30+ import statements of Commons HTTPClient
- Evaluate migration to
org.apache.httpcomponents:httpclient - Update HTTP client usage patterns to modern API
- Test all HTTP integrations and external service calls
Implementation Plan
-
Analysis Phase:
- Review all Commons HTTPClient usage patterns
- Identify deprecated APIs and modern equivalents
- Document external service integrations affected
-
Dependency Update:
- Remove
com.dotcms.lib:dot.commons-httpclientfrom BOM and dotCMS POM - Add
org.apache.httpcomponents:httpclientto BOM with appropriate version - Update dotCMS POM to use modern HTTP client
- Remove
-
Code Migration:
- Find all imports:
com.dotcms.repackage.org.apache.commons.httpclient.* - Replace with:
org.apache.http.*(modern API) - Update approximately 30+ import statements
- Migrate deprecated API calls to modern equivalents
- Find all imports:
-
Testing:
- Test all HTTP integrations (REST calls, external services)
- Verify SSL/TLS handling works correctly
- Check connection pooling and timeout configurations
- Run integration tests with external services
Acceptance Criteria
- [ ] All HTTP client imports updated to modern API
- [ ] Modern HTTP client dependency added to BOM
- [ ] Repackaged Commons HTTPClient removed from POM files
- [ ] All HTTP integration tests pass
- [ ] No performance regressions in HTTP calls
- [ ] SSL/TLS connections work correctly
- [ ] Connection pooling functions properly
Claude Assistance Benefits
- API Migration: Claude can analyze and update HTTP client API usage patterns
- Pattern Recognition: Identify all HTTP client usage across codebase
- Testing Support: Help identify HTTP integration test cases
- Risk Assessment: Evaluate impact of HTTP client API changes
Related
- Epic: #32675 - Remove Repackaged Dependencies
- Phase: 3 - Medium-Risk Migrations
- Priority: High
- Estimated Effort: 3-4 days (with Claude assistance)
Technical Notes
- Commons HTTPClient is deprecated in favor of modern HTTP components
- API changes may require significant code updates
- Critical for external service integrations
- SSL/TLS handling may need verification
- Connection pooling configurations may need updates
Risk Mitigation
- Comprehensive testing of all HTTP integrations
- Verify external service connections work correctly
- Performance testing for HTTP operations
- Rollback plan for HTTP client changes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the BOM and dotCMS POM entries for dot.commons-httpclient, then inventory the 30+ com.dotcms.repackage.org.apache.commons.httpclient imports and their API usage. Run the HTTP integration tests and verify that all imports and dependencies are migrated, external calls, SSL/TLS, timeouts, and pooling still work, and no performance regressions are reported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, networking
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100