Skip Menu |

This queue is for tickets about the HTTP-Daemon CPAN distribution.

Report information
The Basics
Id: 82313
Status: resolved
Priority: 0/
Queue: HTTP-Daemon

People
Owner: Nobody in particular
Requestors: andy [...] andybev.com
Cc:
AdminCc:

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



Subject: [PATCH] Documentation - content-type header
Could I suggest the attached patch for the documentation please? I spent a while searching the internet for the best way to add a content-type header; seeing as everyone will almost certainly want to do this, I think an example would be good in the main documentation. Many thanks.
Subject: content.patch
diff -rupN libwww-perl-5.837/lib/HTTP/Daemon.pm libwww-perl-5.837-andy/lib/HTTP/Daemon.pm --- libwww-perl-5.837/lib/HTTP/Daemon.pm 2009-06-15 19:24:38.000000000 +0100 +++ libwww-perl-5.837-andy/lib/HTTP/Daemon.pm 2012-12-29 00:28:32.302856296 +0000 @@ -630,6 +630,10 @@ HTTP::Daemon - a simple http server clas # remember, this is *not* recommended practice :-) $c->send_file_response("/etc/passwd"); } + elsif ($r->method eq 'GET' and $r->uri->path eq "/image.jpeg") { + $c->send_response('Content-Type: image/jpeg'); + $c->send_file_response("image.jpeg"); + } else { $c->send_error(RC_FORBIDDEN) } @@ -849,6 +853,11 @@ client as the response content. The rou return an undefined or empty value. If the client is HTTP/1.1 aware then we will use chunked transfer encoding for the response. +example: + + # Set the MIME content-type + $c->send_response('Content-Type: text/html'); + =item $c->send_redirect( $loc ) =item $c->send_redirect( $loc, $code )
Subject: [rt.cpan.org #82313] Unable to build using default debhelper
Date: Mon, 29 Dec 2014 14:31:40 +0000
To: bug-Email-AddressParser [...] rt.cpan.org
From: Andrew Beverley <andy [...] andybev.com>
Is there any chance of getting this fixed please? It's preventing automatic building with Debian, as debhelper appears to use -Werror=format-security by default, which forces the build to fail with this potential security problem highlighted. Thanks!
Subject: [rt.cpan.org #82313] Wrong bug!
Date: Mon, 29 Dec 2014 14:36:57 +0000
To: bug-Email-AddressParser [...] rt.cpan.org
From: Andrew Beverley <andy [...] andybev.com>
Sorry, ignore that, sent to the wrong bug number...
On 2012-12-28 19:39:22, abeverley wrote: Show quoted text
> Could I suggest the attached patch for the documentation please? I spent > a while searching the internet for the best way to add a content-type > header; seeing as everyone will almost certainly want to do this, I > think an example would be good in the main documentation.
It looks like this issue should be migrated to https://rt.cpan.org/Dist/Display.html?Name=HTTP-Daemon