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

Fix DialogTest outside apache/mod_php

$
0
0

Problem/Motivation

The following line is a bit problematic.

    $ajax_result = $this->drupalGetAJAX('ajax-test/dialog-contents', array(), array('Accept: application/vnd.drupal-modal'));

The problem is that this ends up sending the following headers:

Accept: application/vnd.drupal-dialog
Accept: application/vnd.drupal-ajax

nginx and apache are handling this differently. In apache PHP gets this for its header:
["HTTP_ACCEPT"]=> string(57) "application/vnd.drupal-modal, application/vnd.drupal-ajax"
but in nginx we're seeing this:
["HTTP_ACCEPT"]=> string(27) "application/vnd.drupal-ajax"

By only receiving the second header the test isn't behaving correctly because the server is negotiating the content type differently.

Proposed resolution

Adjust the "getAjax*" simpletest methods to detect when tests are supplying a different accept header and skip adding the default.

Remaining tasks

User interface changes

None

API changes

None

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue categoryBug because creates false failure in nginx testing environment
Issue priorityNormal bug outside our normal testing infrastructure
Unfrozen changesUnfrozen because it only affects tests

Viewing all articles
Browse latest Browse all 294882

Trending Articles



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