Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Dancer CPAN distribution.

Report information
The Basics
Id: 57829
Status: resolved
Priority: 0/
Queue: Dancer

People
Owner: Nobody in particular
Requestors: richard_david_evans [...] yahoo.co.uk
Cc:
AdminCc:

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



Subject: Custom response headers lost when using JSON serializer
Date: Tue, 25 May 2010 19:31:20 +0100
To: bug-Dancer [...] rt.cpan.org
From: Richard Evans <richard_david_evans [...] yahoo.co.uk>
Hello again Dancer 1.1803 Possibly an issue using the JSON serializer with custom response headers, they appear to get lost - example: package todo; use Dancer ':syntax'; #set serializer => 'JSON'; our $VERSION = '0.1'; post '/' => sub { header 'X-Test' => 'ok'; return { body => 'ok' }; }; true; $ curl http://127.0.0.1:3000 -X POST -v -H "Content-Type: application/json" -d '{"description":"foo"}' ... < HTTP/1.0 200 OK < X-Test: ok < Content-Type: text/html < X-Powered-By: Perl Dancer 1.1803 < ... With "set serializer => 'JSON';" uncommented, the "X-Test: ok" custom header is not output: $ curl http://127.0.0.1:3000 -X POST -v -H "Content-Type: application/json" -d '{"description":"foo"}' ... < HTTP/1.0 200 OK < Content-Type: application/json < X-Powered-By: Perl Dancer 1.1803 < ... Best wishes Richard
Thanks! fixed in commit e9262eb, should be release soon.