plack/Plack — pull request #348 by avar (2012-11-08 22:15:58+00:00)
Title: Plack::Handler::Apache2: normalize duplicate Content-Length headers

If you supply multiple Content-Length headers, e.g.:

Content-Length: 72
Content-Length: 72
Content-Length: 72

Apache will happily produce this for you:

CONTENT_LENGTH => 72, 72, 72

This behavior isn't compliant with the PSGI
spec (https://metacpan.org/module/PSGI) which states:

CONTENT_LENGTH: The length of the content in bytes, as an
integer. The presence or absence of this key should correspond to
the presence or absence of HTTP Content-Length header in the
request.

So patch up Plack::Handler::Apache2 to be compliant and always provide
an integer instead of some concatenated gibberish.