Closed (fixed)
Project:
Services
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
3 Mar 2012 at 02:31 UTC
Updated:
21 Mar 2012 at 22:10 UTC
The way that the REST server's error handling code uses drupal_add_http_header() isn't consistent with the way it's used in core and is probably incorrect. The attached patch fixes this (and incidentally makes logging easier).
For reference, here's an example from bootstrap.inc:
drupal_add_http_header('Status', '404 Not Found');
and from RESTServer.inc:
drupal_add_http_header('HTTP/1.0 204 No Content', $exception->getMessage());
| Comment | File | Size | Author |
|---|---|---|---|
| services-fix-header-usage.patch | 1.89 KB | cotto |
Comments
Comment #1
marcingy commentedLeaving rtbc for a couple of days for others to speak up then I will commit.
Comment #2
cotto commentedIn case anyone's wondering, it's kosher to use custom reason phrases according to the http spec:
The reason phrases listed here are only recommendations -- they MAY be replaced by local equivalents without affecting the protocol.Comment #3
cotto commentedI see no complaints and no new test failures, so I've committed this as c533e0f0d86a3ad5b86732c516d6b1ad94d04c86. Thanks for the eyeballs.