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
Issue category | Bug because creates false failure in nginx testing environment |
---|---|
Issue priority | Normal bug outside our normal testing infrastructure |
Unfrozen changes | Unfrozen because it only affects tests |