@@ -84,7 +84,7 @@ class Flow
84
84
null
85
85
86
86
variances : (req , res )->
87
- accept = if @resource .content_types_provided (req, res).length > 1 then [" Accept" ] else []
87
+ accept = if @resource .content_types_provided_sync (req, res).length > 1 then [" Accept" ] else []
88
88
accept_encoding = if @resource .encodings_provided_sync (req, res).length > 1 then [" Accept-Encoding" ] else []
89
89
accept_charset = if @resource .charsets_provided_sync (req, res).length > 1 then [" Accept-Charset" ] else []
90
90
_ .union (accept, accept_encoding, accept_charset, @resource .variances_sync (req, res))
@@ -113,7 +113,7 @@ class Flow
113
113
v3b12 : (req , res ) ->
114
114
@ decision_test (
115
115
(req , res , next ) =>
116
- next (_ .contains (@resource .known_methods , req .method ))
116
+ next (_ .contains (@resource .known_methods_sync (req, res) , req .method ))
117
117
, req, res, true , ' v3b11' , 501 )
118
118
119
119
# "URI too long?"
@@ -195,8 +195,8 @@ class Flow
195
195
@ decision_test (
196
196
(req , res , next )=>
197
197
unless accept = @ get_header_val (req, ' accept' )
198
- # TODO: = MediaType.parse(@resource.content_types_provided ()[0][0])
199
- @metadata [' Content-Type' ] = _ .first (_ .keys (@resource .content_types_provided ()))
198
+ # TODO: = MediaType.parse(@resource.content_types_provided_sync ()[0][0])
199
+ @metadata [' Content-Type' ] = _ .first (_ .keys (@resource .content_types_provided_sync ()))
200
200
next (' v3d4' )
201
201
else
202
202
next (' v3c4' )
@@ -206,7 +206,7 @@ class Flow
206
206
v3c4 : (req , res ) ->
207
207
@ decision_test (
208
208
(req , res , next )=>
209
- types = _ .keys (@resource .content_types_provided ())
209
+ types = _ .keys (@resource .content_types_provided_sync ())
210
210
chosen_type = @ choose_media_type (types, @ get_header_val (req, ' accept' ))
211
211
unless chosen_type
212
212
next (406 )
@@ -516,7 +516,7 @@ class Flow
516
516
res .header [" Expires" ] = new Date (expires) if expires
517
517
# httpd_util:rfc1123_date(calendar:universal_time_to_local_time(Exp))})
518
518
519
- @resource .content_types_provided req, res, (content_types_provided ) =>
519
+ @resource .content_types_provided_sync req, res, (content_types_provided ) =>
520
520
521
521
content_types = _ .pairs (content_types_provided)
522
522
content_type = @metadata [' Content-Type' ]
@@ -566,7 +566,7 @@ class Flow
566
566
# {MT, MParams} = webmachine_util:media_type_to_detail(CT),
567
567
# wrcall({set_metadata, 'mediaparams', MParams}),
568
568
# case [Fun || {Type,Fun} <-
569
- # resource_call(content_types_accepted ), MT =:= Type] of
569
+ # resource_call(content_types_accepted_sync ), MT =:= Type] of
570
570
# [] -> {respond,415};
571
571
# AcceptedContentList ->
572
572
# F = hd(AcceptedContentList),
0 commit comments