Subject: [sipcore] 415 Unsoprted Media Type response & MIME type paramteer

From: <[email-masked]>
Date: Tue, 9 Oct 2012 00:52:34 +0000

Hello all,

A mandatory MIME type parameter may be associated to the MIME type name.

A UAS may receive a request with a content-type set to a MIME type name which it supports and  an associated  mandatory parameter set to a non-supported value. My understanding is that the UAS in that case must reject the request with a 415 "Unsupported Media Type". In fact, both the MIME Type name AND the associated parameter describe the media type.

Is my understanding correct ?

I did not find an explicit answer to this in RFC 3261. This latter says:
21.4.13 415 Unsupported Media Type

   The server is refusing to service the request because the message
   body of the request is in a format not supported by the server for
   the requested method.  The server MUST return a list of acceptable
   formats using the Accept, Accept-Encoding, or Accept-Language header
   field, depending on the specific problem with the content.  UAC
   processing of this response is described in Section 8.1.3.5

Youssef

_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
France Telecom - Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, France Telecom - Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

---

From: Paul Kyzivat <[email-masked]>
Date: Wed, 10 Oct 2012 13:40:28 -0400

On 10/8/12 8:52 PM, [email-masked] wrote:
> A UAS may receive a request with a content-type set to a MIME type name
> which it supports and  an associated  mandatory parameter set to a
> non-supported value. My understanding is that the UAS in that case must
> reject the request with a 415 “Unsupported Media Type”. In fact, both
> the MIME Type name AND the associated parameter describe the media type.
>

I'm not an expert on MIME types and MIME type parameters.
But if you don't support the particular combination of MIME type and 
parameter then I agree this seems to be the correct way to indicate that.

In this case you then need to include an Accept header in the 415, 
showing the types you *do* support. Presumably you should then indicate 
this MIME type with the parameter you do support. E.g. if you have 
objected to 'Content-Type: foo/bar;p1' then the 415 should include
'Accept: foo/bar;p2,foo/bar;p3' indicating that you support the p2 and 
p3 variants.

(You need to look at section 14.1 of RFC2616 for details of the Accept 
header.)

	Thanks,
	Paul

> _______________________________________________
> sipcore mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/sipcore
>