Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double Server header #1664

Open
melmothx opened this issue Apr 21, 2022 · 1 comment
Open

Double Server header #1664

melmothx opened this issue Apr 21, 2022 · 1 comment
Labels

Comments

@melmothx
Copy link

Given this code:

#!/usr/bin/env perl
use Dancer2;
 
get '/' => sub {
    my $name = "Marco";
    return "Hello $name\n";
};
 
start;

./dancer.pl
>> Dancer2 v0.400000 server 293140 listening on http://0.0.0.0:3000

Output:

 curl -D - http://0.0.0.0:3000
HTTP/1.0 200 OK
Date: Thu, 21 Apr 2022 05:41:45 GMT
Server: Perl Dancer2 0.400000
Server: Perl Dancer2 0.400000
Content-Length: 12
Content-Type: text/html; charset=UTF-8

Hello Marco

I don't think it's a critical problem but looks weird.

Thanks

@cromedome
Copy link
Contributor

Thanks for the bug report.

I did a little digging as to why I hadn't seen this before, and this only occurs when Dancer apps are instantiated with the dance or start keywords; if the app is executed from a Plack server via plackup, you don't see the double header. So you've revealed a deficiency in how I look at things around release time. Thanks :) I'll see if I can get this patched up soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants