informatics-isi-edu / hatrac

Simple object storage for collaborations
Apache License 2.0
3 stars 1 forks source link

Stop using 501 http status #51

Open karlcz opened 5 years ago

karlcz commented 5 years ago

There is some misguided use of 501 Not Implemented status to complain when the client asks for range requests in scenarios which are not supported. I think there are separate cases to consider:

  1. We don't want to support it: just return 200 OK with full response
  2. It is malformed: return 400 Bad Request?
  3. It is unsatisfiable: return 416 Requested Range Not Satisfiable

none of these are particularly relevant to well behaved clients, but it seems we have encountered bad clients who send Range headers on resources where we do not advertise support via Accept-Range.