Skip to content

Commit 5f6bd29

Browse files
committed
HTTP-Daemon-6.07-TRIAL
- Prefer IP address for host in $d->url (GH#40) (Shoichi Kaji) - Improve documentation readability (GH#36) (Ferenc Erki)
1 parent 611a1b2 commit 5f6bd29

3 files changed

Lines changed: 36 additions & 26 deletions

File tree

CONTRIBUTING

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ Once installed, here are some dzil commands you might try:
7272
You can learn more about Dist::Zilla at http://dzil.org/.
7373

7474
The code for this distribution is hosted at GitHub. The repository is:
75+
7576
https://github.com/libwww-perl/HTTP-Daemon
77+
7678
You can submit code changes by forking the repository, pushing your code
7779
changes to your clone, and then submitting a pull request. Please include a
7880
suitable end-user-oriented entry in the Changes file describing your change.
@@ -104,4 +106,4 @@ request to the .mailmap file to contain the correct mapping.
104106

105107

106108
This file was generated via Dist::Zilla::Plugin::GenerateFile::FromShareDir 0.014
107-
from a template file originating in Dist-Zilla-PluginBundle-Author-ETHER-0.149.
109+
from a template file originating in Dist-Zilla-PluginBundle-Author-ETHER-0.156.

Changes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Revision history for HTTP-Daemon
22

3-
{{$NEXT}}
3+
6.07 2020-05-19 19:19:53Z (TRIAL RELEASE)
44
- Prefer IP address for host in $d->url (GH#40) (Shoichi Kaji)
55
- Improve documentation readability (GH#36) (Ferenc Erki)
66

README.pod

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ HTTP::Daemon - A simple http server class
88

99
=head1 VERSION
1010

11-
version 6.06
11+
version 6.07
1212

1313
=head1 SYNOPSIS
1414

@@ -19,13 +19,13 @@ version 6.06
1919
print "Please contact me at: <URL:", $d->url, ">\n";
2020
while (my $c = $d->accept) {
2121
while (my $r = $c->get_request) {
22-
if ($r->method eq 'GET' and $r->uri->path eq "/xyzzy") {
22+
if ($r->method eq 'GET' and $r->uri->path eq "/xyzzy") {
2323
# remember, this is *not* recommended practice :-)
24-
$c->send_file_response("/etc/passwd");
25-
}
26-
else {
27-
$c->send_error(RC_FORBIDDEN)
28-
}
24+
$c->send_file_response("/etc/passwd");
25+
}
26+
else {
27+
$c->send_error(RC_FORBIDDEN)
28+
}
2929
}
3030
$c->close;
3131
undef($c);
@@ -73,15 +73,15 @@ HTTP port will be constructed like this:
7373
);
7474

7575
See L<IO::Socket::IP> for a description of other arguments that can
76-
be used configure the daemon during construction.
76+
be used to configure the daemon during construction.
7777

7878
=item $c = $d->accept
7979

8080
=item $c = $d->accept( $pkg )
8181

8282
=item ($c, $peer_addr) = $d->accept
8383

84-
This method works the same the one provided by the base class, but it
84+
This method works the same as the one provided by the base class, but it
8585
returns an C<HTTP::Daemon::ClientConn> reference by default. If a
8686
package name is provided as argument, then the returned object will be
8787
blessed into the given class. It is probably a good idea to make that
@@ -92,7 +92,7 @@ and no connection is made within the given time. The timeout() method
9292
is described in L<IO::Socket::IP>.
9393

9494
In list context both the client object and the peer address will be
95-
returned; see the description of the accept method L<IO::Socket> for
95+
returned; see the description of the accept method of L<IO::Socket> for
9696
details.
9797

9898
=item $d->url
@@ -111,8 +111,8 @@ replaced with the version number of this module.
111111

112112
=back
113113

114-
The C<HTTP::Daemon::ClientConn> is a C<IO::Socket::IP>
115-
subclass. Instances of this class are returned by the accept() method
114+
The C<HTTP::Daemon::ClientConn> is a subclass of C<IO::Socket::IP>.
115+
Instances of this class are returned by the accept() method
116116
of C<HTTP::Daemon>. The following methods are provided:
117117

118118
=over 4
@@ -124,7 +124,7 @@ of C<HTTP::Daemon>. The following methods are provided:
124124
This method reads data from the client and turns it into an
125125
C<HTTP::Request> object which is returned. It returns C<undef>
126126
if reading fails. If it fails, then the C<HTTP::Daemon::ClientConn>
127-
object ($c) should be discarded, and you should not try call this
127+
object ($c) should be discarded, and you should not try to call this
128128
method again on it. The $c->reason method might give you some
129129
information about why $c->get_request failed.
130130

@@ -182,8 +182,8 @@ body must be generated for these requests.
182182
=item $c->force_last_request
183183

184184
Make sure that $c->get_request will not try to read more requests off
185-
this connection. If you generate a response that is not self
186-
delimiting, then you should signal this fact by calling this method.
185+
this connection. If you generate a response that is not self-delimiting,
186+
then you should signal this fact by calling this method.
187187

188188
This attribute is turned on automatically if the client announces
189189
protocol HTTP/1.0 or worse and does not include a "Connection:
@@ -230,16 +230,16 @@ Send one or more header lines.
230230

231231
=item $c->send_response( $res )
232232

233-
Write a C<HTTP::Response> object to the
233+
Write an C<HTTP::Response> object to the
234234
client as a response. We try hard to make sure that the response is
235-
self delimiting so that the connection can stay persistent for further
235+
self-delimiting so that the connection can stay persistent for further
236236
request/response exchanges.
237237

238238
The content attribute of the C<HTTP::Response> object can be a normal
239239
string or a subroutine reference. If it is a subroutine, then
240240
whatever this callback routine returns is written back to the
241241
client as the response content. The routine will be called until it
242-
return an undefined or empty value. If the client is HTTP/1.1 aware
242+
returns an undefined or empty value. If the client is HTTP/1.1 aware
243243
then we will use chunked transfer encoding for the response.
244244

245245
=item $c->send_redirect( $loc )
@@ -249,7 +249,7 @@ then we will use chunked transfer encoding for the response.
249249
=item $c->send_redirect( $loc, $code, $entity_body )
250250

251251
Send a redirect response back to the client. The location ($loc) can
252-
be an absolute or relative URL. The $code must be one the redirect
252+
be an absolute or relative URL. The $code must be one of the redirect
253253
status codes, and defaults to "301 Moved Permanently"
254254

255255
=item $c->send_error
@@ -260,7 +260,7 @@ status codes, and defaults to "301 Moved Permanently"
260260

261261
Send an error response back to the client. If the $code is missing a
262262
"Bad Request" error is reported. The $error_message is a string that
263-
is incorporated in the body of the HTML entity body.
263+
is incorporated in the body of the HTML entity.
264264

265265
=item $c->send_file_response( $filename )
266266

@@ -303,7 +303,7 @@ Gisle Aas <gisle@activestate.com>
303303

304304
=head1 CONTRIBUTORS
305305

306-
=for stopwords Ville Skyttä Olaf Alders Mark Stosberg Karen Etheridge Chase Whitener Slaven Rezic Zefram Alexey Tourbin Bron Gondwana Petr Písař Mike Schilli Tom Hukins Ian Kilgore Jacob J Ondrej Hanak Perlover Peter Rabbitson Robert Stone Rolf Grossmann Sean M. Burke Spiros Denaxas Steve Hay Todd Lipcon Tony Finch Toru Yamaguchi Yuri Karaban amire80 jefflee john9art murphy phrstbrn ruff Adam Kennedy sasao Sjogren Alex Kapranoff Andreas J. Koenig Bill Mann DAVIDRW Daniel Hedlund David E. Wheeler FWILES Father Chrysostomos Gavin Peters Graeme Thompson Hans-H. Froehlich
306+
=for stopwords Ville Skyttä Olaf Alders Mark Stosberg Karen Etheridge Chase Whitener Slaven Rezic Shoichi Kaji Zefram Bron Gondwana Petr Písař Tom Hukins Mike Schilli Alexey Tourbin Ian Kilgore Jacob J Ondrej Hanak Perlover Peter Rabbitson Robert Stone Rolf Grossmann Sean M. Burke Spiros Denaxas Steve Hay Todd Lipcon Tony Finch Toru Yamaguchi Yuri Karaban amire80 jefflee john9art murphy phrstbrn ruff Adam Kennedy sasao Sjogren Alex Kapranoff Andreas J. Koenig Bill Mann DAVIDRW Daniel Hedlund David E. Wheeler FWILES Father Chrysostomos Ferenc Erki Gavin Peters Graeme Thompson Hans-H. Froehlich
307307

308308
=over 4
309309

@@ -333,11 +333,11 @@ Slaven Rezic <slaven@rezic.de>
333333

334334
=item *
335335

336-
Zefram <zefram@fysh.org>
336+
Shoichi Kaji <skaji@cpan.org>
337337

338338
=item *
339339

340-
Alexey Tourbin <at@altlinux.ru>
340+
Zefram <zefram@fysh.org>
341341

342342
=item *
343343

@@ -349,11 +349,15 @@ Petr Písař <ppisar@redhat.com>
349349

350350
=item *
351351

352+
Tom Hukins <tom@eborcom.com>
353+
354+
=item *
355+
352356
Mike Schilli <mschilli@yahoo-inc.com>
353357

354358
=item *
355359

356-
Tom Hukins <tom@eborcom.com>
360+
Alexey Tourbin <at@altlinux.ru>
357361

358362
=item *
359363

@@ -481,6 +485,10 @@ Father Chrysostomos <sprout@cpan.org>
481485

482486
=item *
483487

488+
Ferenc Erki <erkiferenc@gmail.com>
489+
490+
=item *
491+
484492
Gavin Peters <gpeters@deepsky.com>
485493

486494
=item *

0 commit comments

Comments
 (0)