[gcs-pcs-list] new issue: is 406 correct?

Daniel Chudnov daniel.chudnov at yale.edu
Thu Mar 2 15:14:31 EST 2006


unAPI revision 1 states, at the very bottom, among the HTTP status
code notes:

  "requests for a URI that is available on the server but for a format
  that is not available for that URI should return status code 406
  Not Acceptable"


While implementing OPA I reread what HTTP status code 406 Not Acceptable
means:

  http://rfc.net/rfc2616.html#s10.4.7

  "The resource identified by the request is only capable of generating
  response entities which have content characteristics not acceptable
  according to the accept headers sent in the request."

Note that we are not currently addressing accept headers in unAPI 
(not that it hasn't come up :).

Perhaps it would be better to use HTTP 415 Unsupported Media Type:

  http://rfc.net/rfc2616.html#s10.4.16

  "The server is refusing to service the request because the entity of
  the request is in a format not supported by the requested resource
  for the requested method."

  (Note that this does not even specify mime-type but rather the more
   general-purpose "format".)


That seems like an exact match, and therefore better.  I'll propose we
change that note, and thus the spec, to now read (where before it read
as in the first quote):

  "requests for a URI that is available on the server but for a format
  that is not available for that URI should return status code 415
  Unsupported Media Type"


But, I have no idea if this matters to browsers/languages/etc.

  -Dan


-- 
Daniel Chudnov
Yale Center for Medical Informatics
(203) 737-5789


More information about the gcs-pcs-list mailing list