Skip Menu |

This queue is for tickets about the JSON-RPC-Common CPAN distribution.

Report information
The Basics
Id: 60695
Status: resolved
Priority: 0/
Queue: JSON-RPC-Common

People
Owner: Nobody in particular
Requestors: ryan [...] siew.ca
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.07
Fixed in: (no value)



Subject: write_result_to_response in JSON::RPC::Common::Marshal::HTTP croaks with message "BAH"
As of version 0.07, write_result_to_response in JSON::RPC::Common::Marshal::HTTP croaks with the error message "BAH" Reason: write_result_to_response calls the sub "result_to_response_params" and gets the following keys in a hash: status Content_Type Content_Length body Then it does a $response->can($key) The parts that fail are: $response->can("Content_Type"); $response->can("Content_Length"); because "Content_Type" and "Content_Length" should be lower case. If you look at Catalyst::Response for example, the content_length and content_type subs are both lowercase In version 0.6, the content_type key was lowercase. Suggested patch: < Content_Type => $self->get_content_type($result), < Content_Length => length($body), # http://json-rpc.org/wd/JSON-RPC-1-1-WD-20060807.html#ResponseHeaders Show quoted text
> content_type => $self->get_content_type($result), > content_length => length($body), #
http://json-rpc.org/wd/JSON-RPC-1-1-WD-20060807.html#ResponseHeaders
Fixed in 0.09.