Contribution Widget Not Displaying Properly
Thanks to Marty Wright for reporting the bug and providing a solution.

https://issues.civicrm.org/jira/si/jira.issueviews:issue-html/CRM-17965/CRM-17965.html

The widget code generated for a contribution page fails trying to retrieve the json page data from the server. The output from http:///sites/all/modules/civicrm/extern/widget.php is:

Fatal error: Call to undefined function drupal_add_http_header() in //sites/all/modules/civicrm/CRM/Utils/System/Drupal.php on line 789

This happens because Drupal is not booted when extern/widget.php runs, and CRM_Core_Page_AJAX::setJsHeaders() calls CRM_System_Utils_Drupal::setHttpHeader() which attempts to call drupal_add_http_header().

To reproduce on the demo site:
Enable the widget on the "Help Support CiviCRM!" contribution page.
Find the javascript source url at the bottom of the generated code:
http://dmaster.demo.civicrm.org/sites/all/modules/civicrm//extern/widget.php?cpageId=1&amp;widgetId=1&amp;format=3
Copy and paste the url into a browser to view what should be the json output, but instead:
Fatal error: Call to undefined function drupal_add_http_header() in /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Utils/System/Drupal.php on line 789

To fix the problem, I added a call to loadBootStrap() in CRM_System_Utils_Drupal::setHttpHeader()

  public function setHttpHeader($name, $value) {
    self::loadBootStrap(NULL, FALSE);
    drupal_add_http_header($name, $value);
  }