[java]: fix decoding of line endings
User description
Thanks for contributing to Selenium! A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines. Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Fixes https://github.com/SeleniumHQ/selenium/issues/13207
Motivation and Context
It removes old code which changed the line endings from \r\n to \n because it is not needed anymore and also breaks encoding-decoding. @titusfortner said removing this shouldn't impact anything and this code is also useless because other bindings don't do it.
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [x] I have read the contributing document.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [] I have added tests to cover my changes.
- [x] All new and existing tests passed.
PR Type
Bug fix
Description
- Removed the code that changed line endings from
\r\nto\nin theAbstractHttpResponseCodecclass, as it was unnecessary and caused encoding-decoding issues. - Ensured that the response value is set directly without altering line endings, aligning with other bindings.
Changes walkthrough 📝
| Relevant files | |||
|---|---|---|---|
| Bug fix |
|
💡 PR-Agent usage: Comment
/help "your question"on any pull request to receive relevant information
PR Reviewer Guide 🔍
| ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪ |
| 🧪 No relevant tests |
| 🔒 No security concerns identified |
| ⚡ Key issues to review Potential Compatibility Issue |
PR Code Suggestions ✨
| Category | Suggestion | Score |
| Maintainability |
Add a comment to explain the removal of line ending normalizationConsider adding a comment explaining why the line ending normalization was removed. java/src/org/openqa/selenium/remote/codec/AbstractHttpResponseCodec.java [105-107]
Suggestion importance[1-10]: 7Why: Adding a comment to explain the removal of line ending normalization can improve maintainability by providing context for future developers, though it is not crucial for functionality. | 7 |
💡 Need additional feedback ? start a PR chat