0
votes

I am just getting started with setting up an app using Perl Dancer on Apache. I used the provided dancer script to setup my initial directory structure, and was able to get things setup to the point of seeing the initial "Perl is Dancing" page. Unfortunately, I noticed that the very end of the HTML markup is not included when I do a view source. Further investigation with Fiddler revealed the following error:

Content-Length mismatch: Response Header indicated 3,168 bytes, but server sent 3,364 bytes.

After seeing this, I did some additional experimentation, running the Dancer app directly via invoking app.pl from the command line. When I access that server, I get the full HTML markup and not content-length issues are reported by Fiddler.

Does anyone have any ideas why I may be seeing this incorrect content length issue when running through Apache? I should also mention that I am running through the generated CGI script that invokes app.pl via Plack::Runner. Please let me know if I need to provide additional details.

Dancer version is 1.3030 and Plack version is 0.9976.

1
Your versions of Dancer and Plack are useful to know.daxim

1 Answers

2
votes

It turns out that there was an issue with Plack. The revision history mentions "Fixed a CGI/FastCGI handler to ensure newlines are not mangled on Win32 platforms" for version 0.9977 (I failed to mention previously that I am running on Win32). I updated Plack to the latest version (currently 0.9978), and the problem went away.