Subject: | trivial documentation typo |
Date: | Fri, 16 Sep 2011 14:36:44 -0700 |
To: | bug-AnyEvent-HTTPD [...] rt.cpan.org |
From: | Tani Hosokawa <tani [...] tanihosokawa.org> |
diff -ru AnyEvent-HTTPD-0.93.orig/lib/AnyEvent/HTTPD/Request.pm AnyEvent-HTTPD-0.93/lib/AnyEvent/HTTPD/Request.pm
--- AnyEvent-HTTPD-0.93.orig/lib/AnyEvent/HTTPD/Request.pm 2011-08-04 01:42:41.000000000 -0700
+++ AnyEvent-HTTPD-0.93/lib/AnyEvent/HTTPD/Request.pm 2011-09-16 14:33:57.000000000 -0700
@@ -47,7 +47,7 @@
Then the array reference has these elements:
my ($code, $message, $header_hash, $content) =
- [200, 'ok', { 'Content-Type' => 'text/html' }, '<h1>Test</h1>' }]
+ [200, 'ok', { 'Content-Type' => 'text/html' }, '<h1>Test</h1>' ]
You can remove most headers added by default (like C<Cache-Control>,
C<Expires>, and C<Content-Length>) by setting them to undef, like so:
diff -ru AnyEvent-HTTPD-0.93.orig/lib/AnyEvent/HTTPD.pm AnyEvent-HTTPD-0.93/lib/AnyEvent/HTTPD.pm
--- AnyEvent-HTTPD-0.93.orig/lib/AnyEvent/HTTPD.pm 2011-08-04 01:42:05.000000000 -0700
+++ AnyEvent-HTTPD-0.93/lib/AnyEvent/HTTPD.pm 2011-09-16 14:33:30.000000000 -0700
@@ -349,7 +349,7 @@
'/test/bla.jpg' => sub {
my ($httpd, $req) = @_;
- $req->respond ([200, 'ok', { 'Content-Type' => 'text/html' }, '<h1>Test</h1>' }]);
+ $req->respond ([200, 'ok', { 'Content-Type' => 'text/html' }, '<h1>Test</h1>' ]);
}
);