Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294288

WebDriver HTTP error 400 Bad Content-Length errors

$
0
0

Problem/Motivation

#2942900: Convert JavascriptTestBase Tests to use DrupalSelenium2Driver introduced \Drupal\FunctionalJavascriptTests\WebDriverCurlService.

That extends \WebDriver\Service\CurlService, which was recently updated to not send

                    $customHeaders[] = 'Content-Length: 0';

but

                    $customHeaders[] = 'Content-Length: 0';

                    // Suppress "Transfer-Encoding: chunked" header automatically added by cURL that
                    // causes a 400 bad request (bad content-length).
                    $customHeaders[] = 'Transfer-Encoding:';

Drupal's subclass does not do that, and hence results in errors like this:

1) Drupal\Tests\media\FunctionalJavascript\CKEditorIntegrationTest::testPreviewUsesDefaultThemeAndIsClientCacheable
WebDriver\Exception\CurlExec: Curl error thrown for http POST to http://localhost:4444/wd/hub/session/96b11bb539709524afdbb8393ed07e6c/element/0.8283755658968526-1/click

The requested URL returned error: 400 Bad Content-Length

/Users/wim.leers/Work/d8/vendor/instaclick/php-webdriver/lib/WebDriver/Exception.php:155
/Users/wim.leers/Work/d8/core/tests/Drupal/FunctionalJavascriptTests/WebDriverCurlService.php:107
/Users/wim.leers/Work/d8/vendor/instaclick/php-webdriver/lib/WebDriver/AbstractWebDriver.php:123
/Users/wim.leers/Work/d8/vendor/instaclick/php-webdriver/lib/WebDriver/AbstractWebDriver.php:218
/Users/wim.leers/Work/d8/vendor/instaclick/php-webdriver/lib/WebDriver/Container.php:224
/Users/wim.leers/Work/d8/vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php:781
/Users/wim.leers/Work/d8/vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php:769
/Users/wim.leers/Work/d8/vendor/behat/mink/src/Element/NodeElement.php:153
/Users/wim.leers/Work/d8/vendor/behat/mink/src/Element/NodeElement.php:161
/Users/wim.leers/Work/d8/core/tests/Drupal/Tests/UiHelperTrait.php:100
/Users/wim.leers/Work/d8/core/tests/Drupal/Tests/UiHelperTrait.php:250
/Users/wim.leers/Work/d8/core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php:153

This happens with:

Proposed resolution

Port the upstream changes.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 294288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>