-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[java] fix null request in case of chunked request #13113
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## trunk #13113 +/- ##
=======================================
Coverage 57.52% 57.52%
=======================================
Files 86 86
Lines 5299 5299
Branches 221 221
=======================================
Hits 3048 3048
Misses 2030 2030
Partials 221 221 ☔ View full report in Codecov by Sentry. |
@nikhlagrwl thanks for opening the PR, what client are you using to have chunked requests? |
@joerg1985 I tried with a ruby client and even with curl command, it's failing on both the case. |
@nikhlagrwl could you share the curl call? |
echo '{"desiredCapabilities":{"browserName": "firefox"},"requiredCapabilities":{}}' | curl -N -X POST --connect-timeout 20 --data-binary @- -H "Transfer-Encoding: chunked" -H 'Content-Type: application/json; charset=utf-8' -H 'Expect: 100-continue' http://localhost:4444/wd/hub/session -vvv |
Please note, that payload is not valid anymore as it is JWP, not W3C WebDriver. |
java/src/org/openqa/selenium/netty/server/RequestConverter.java
Outdated
Show resolved
Hide resolved
java/src/org/openqa/selenium/netty/server/RequestConverter.java
Outdated
Show resolved
Hide resolved
please run |
@titusfortner Resolved linting issues |
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
Selenium throws a NullPointerException in case of chunked request. The request object is initialised after sending 100 response for chunked requests and hence for the last chunk of the request, the request object is null.
Motivation and Context
Types of changes
Checklist