Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Custom accept headers
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Steve Klabnik  
View profile  
 More options Oct 31 2012, 10:50 am
From: Steve Klabnik <st...@steveklabnik.com>
Date: Wed, 31 Oct 2012 07:50:26 -0700
Local: Wed, Oct 31 2012 10:50 am
Subject: Re: [Rails-core] Custom accept headers

> Shouldn't Rails coerce these new almost standart headers to application/json
> and applicatioin/xml (for previous example) ?

No, because 'application/vnd.foo-v1+json' is not 'application/json.'
The "+foo" convention was actually introduced in RFC3023, specifically
for XML formats. But it's only a convention, as the RFC says:

> A.13 What is the semantic difference between application/foo and
>      application/foo+xml?

>   MIME processors that are unaware of XML will treat the '+xml' suffix
>   as completely opaque, so it is essential that no extra semantics be
>   assigned to its presence.  Therefore, application/foo and
>  application/foo+xml SHOULD be treated as completely independent media
>   types.  Although, for example, text/calendar+xml could be an XML
>   version of text/calendar[RFC2445], it is possible that this
>   (hypothetical) new media type would include new semantics as well as
>   new syntax, and in any case, there would be many applications that
>   support text/calendar but had not yet been upgraded to support
>   text/calendar+xml.

Making it work with respond_to :"vnd.foo-v1+json" seems fine, though.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.