search for: encode_param

Displaying 2 results from an estimated 2 matches for "encode_param".

Did you mean: encode_params
2011 Sep 14
1
Hitting 500 status code on invalid UTF-8 byte sequence in params
...ails/rails/blob/3-1-stable/actionpack/lib/action_dispatch/http/parameters.rb#L39 # TODO: Validate that the characters are UTF-8. If they aren''t, # you''ll get a weird error down the road, but our form handling # should really prevent that from happening def encode_params(params) That''s exactly what happens to us, and since the data isn''t coming from a webform we don''t enjoy the mentioned form handling. I''d vote for a fix along the lines of Iconv.conv("#{$KCODE}//IGNORE", $KCODE, ...), but I''m not sure what w...
2011 Jan 10
0
Can't use ActionDispatch::Request in Rails middleware because path_parameters get lost
...on_dispatch/http/parameters.rb # Returns both GET and POST \parameters in a single hash. def parameters @env["action_dispatch.request.parameters"] ||= begin params = request_parameters.merge(query_parameters) params.merge!(path_parameters) encode_params(params).with_indifferent_access end end alias :params :parameters def path_parameters=(parameters) #:nodoc: @symbolized_path_params = nil @env.delete("action_dispatch.request.parameters") @env["action_dispatch.request.path_parameter...