Skip Menu |

This queue is for tickets about the CGI-Application-Plugin-JSON CPAN distribution.

Report information
The Basics
Id: 44849
Status: open
Priority: 0/
Queue: CGI-Application-Plugin-JSON

People
Owner: Nobody in particular
Requestors: frioux [...] gmail.com
Cc:
AdminCc:

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



Subject: incorrect header being sent
The header should be application/json, not text/x-json, according to this document: http://www.ietf.org/rfc/rfc4627.txt. Changing the _send_headers function as follows should fix the issue: sub _send_headers { my $self = shift; my $private = $self->param('__CAP_JSON') || {}; if( defined $private->{header} ) { $self->header_add( '-x-json' => $self->json_header_string ); } if( defined $private->{json_body} ) { $self->header_add('-type' => 'application/json'); } elsif ( defined $private->{json_callback} ) { $self->header_add('-type' => 'text/javascript'); } } Thanks!
Thanks for the pointer to the rfc. This has been fixed in 1.02 which has just been uploaded to CPAN
Subject: Re: [rt.cpan.org #44849] incorrect header being sent
Date: Wed, 8 Apr 2009 16:46:36 -0500
To: bug-CGI-Application-Plugin-JSON [...] rt.cpan.org
From: fREW Schmidt <frioux [...] gmail.com>
On Wed, Apr 8, 2009 at 2:56 PM, Michael Peters via RT < bug-CGI-Application-Plugin-JSON@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=44849 > > > Thanks for the pointer to the rfc. This has been fixed in 1.02 which has > just been uploaded to CPAN >
Excellent! Thanks much! -- fREW Schmidt http://blog.afoolishmanifesto.com