Skip to content
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

WebDriver: don't send a request body for HTTP GET requests #9465

Merged
merged 1 commit into from Feb 28, 2018

Conversation

Projects
None yet
4 participants
@burg
Copy link
Contributor

burg commented Feb 9, 2018

Due to the fact that Python's None is serializable as JSON,
the transport was always sending the string "null" as the body
for all requests which did not specify some other body. This
leads to HTTP GET requests with a non-zero Content-Length,
which is bad.

Fix this by only trying to encode the payload if the body
parameter has a non-default value. I don't think there is
a valid use case where a request payload is a top-level 'null'.


This change is Reviewable

Brian Burg
WebDriver: don't send a request body for HTTP GET requests
Due to the fact that Python's None is serializable as JSON,
the transport was always sending the string "null" as the body
for all requests which did not specify some other body. This
leads to HTTP GET requests with a non-zero Content-Length,
which is bad.

Fix this by only trying to encode the payload if the body
parameter has a non-default value. I don't think there is
a valid use case where a request payload is a top-level 'null'.

@wpt-pr-bot wpt-pr-bot added the infra label Feb 9, 2018

@wpt-pr-bot wpt-pr-bot requested review from gsnedders and jgraham Feb 9, 2018

@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Feb 9, 2018

Build PASSED

Started: 2018-02-09 19:38:50
Finished: 2018-02-09 19:55:32

View more information about this build on:

@jgraham jgraham merged commit c2c395d into web-platform-tests:master Feb 28, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.