File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
src/steps/http/content-negotiation
test/integration/content-negotiation Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ import {objectIsEmpty} from "../../../util/type-handling";
6
6
export default function validateContentType ( requestContext , supportedExt ) {
7
7
return Q . Promise ( function ( resolve , reject ) {
8
8
let contentType = contentTypeParser . parse ( requestContext . contentType ) ;
9
+
10
+ // Removed due to issues with Firefox automatically adding charset parameter
11
+ // See: https://github.com/ethanresnick/json-api/issues/78
12
+ delete contentType . parameters . charset ;
9
13
10
14
// In the future, we might delegate back to the framework if the client
11
15
// provides a base content type other than json-api's. But, for now, we 415.
Original file line number Diff line number Diff line change @@ -23,6 +23,19 @@ AgentPromise.then((Agent) => {
23
23
} ) . catch ( done ) ;
24
24
} ) ;
25
25
26
+ // Spec ignored due to issues with Firefox automatically adding charset parameter
27
+ // See: https://github.com/ethanresnick/json-api/issues/78
28
+ it ( "must accept charset parameter" , ( done ) => {
29
+ Agent . request ( "POST" , "/organizations" )
30
+ . type ( "application/vnd.api+json;charset=utf-8" )
31
+ . send ( { "data" : VALID_ORG_RESOURCE_NO_ID } )
32
+ . promise ( )
33
+ . then ( ( res ) => {
34
+ expect ( res . status ) . to . equal ( 201 ) ;
35
+ done ( ) ;
36
+ } , done ) . catch ( done ) ;
37
+ } ) ;
38
+
26
39
// "Servers MUST send all JSON API data in response documents with the
27
40
// header Content-Type: application/vnd.api+json without any media type
28
41
// parameters."
You can’t perform that action at this time.
0 commit comments