bshaffer/oauth2-server-php — pull request #67 by insom (2013-02-26 10:42:42+00:00)
Title: Serve `application/json` headers without send()

The headers for JSON and XML output are only set if you call `OAuth2_Response::send()` - the demo OAuth application uses `OAuth2\HttpFoundationBridge\Server`:

https://github.com/bshaffer/oauth2-server-httpfoundation-bridge/blob/master/src/OAuth2/HttpFoundationBridge/Server.php#L31

This doesn't call send() - it calls `getHttpHeaders()`, so I've moved the logic into there, and I've also made `getHttpHeader()` call `$this->getHttpHeaders()`, for consistency.

Please find enclosed two additional tests that prove it works.