Closed
Bug 747494
Opened 13 years ago
Closed 13 years ago
Consider HTTP 415 on invalid media type
Categories
(Cloud Services Graveyard :: Server: Sync, defect)
Cloud Services Graveyard
Server: Sync
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: gps, Assigned: rfkelly)
Details
(Whiteboard: [qa?])
Attachments
(2 files)
|
1.59 KB,
patch
|
gps
:
review+
|
Details | Diff | Splinter Review |
|
3.06 KB,
patch
|
telliott
:
review+
|
Details | Diff | Splinter Review |
Currently when the client issues a request with an improper media type via Content-Type (e.g. POST storage/collection/foo with Content-Type: application/octet-stream -- as tested in test_set_collection_input_formats), the server responds with a 400.
HTTP has a dedicated status code for this: 415 Unsupported Media Type.
I propose changing the spec and server implementation to send this instead of a 400.
Updated•13 years ago
|
Whiteboard: [qa?]
| Assignee | ||
Comment 2•13 years ago
|
||
Attachment #617365 -
Flags: review?(gps)
| Assignee | ||
Comment 3•13 years ago
|
||
This adds 415-Unsupported-Media-Type to both POST /storage/collection and PUT /storage/collection/id. The latter previously had no explicit checking of the content-type header.
Attachment #617366 -
Flags: review?(telliott)
| Reporter | ||
Comment 4•13 years ago
|
||
Comment on attachment 617365 [details] [diff] [review]
docs pach adding 415 response code
Review of attachment 617365 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good!
::: source/spelling_wordlist.txt
@@ +72,4 @@
> json
> keyexchange
> KeyExchange
> +kibibypes
"bypes" ?
Attachment #617365 -
Flags: review?(gps) → review+
Comment 5•13 years ago
|
||
Comment on attachment 617366 [details] [diff] [review]
code pach adding 415 response code
This is fine, but I think it should get rolled into cornice eventually. You specify acceptable media types somewhere and it magically gives you this.
Attachment #617366 -
Flags: review?(telliott) → review+
Comment 6•13 years ago
|
||
Yeah good idea - https://github.com/mozilla-services/circus/issues/95
| Assignee | ||
Comment 7•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•2 years ago
|
Product: Cloud Services → Cloud Services Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•