Skip to content

Commit

Permalink
Rework Pod formatting for Best Practices
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders authored and genio committed Apr 10, 2019
1 parent fc9e10d commit 14f0a97
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions lib/LWP/UserAgent.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2028,9 +2028,7 @@ URL, and true otherwise.
The default settings can get you up and running quickly, but there are settings
you can change in order to make your life easier.
=over
=item cookie_jar
=head2 Handling Cookies
You are encouraged to install L<Mozilla::PublicSuffix> and use
L<HTTP::CookieJar::LWP> as your cookie jar. L<HTTP::CookieJar::LWP> provides a
Expand All @@ -2042,29 +2040,29 @@ L<Mozilla::PublicSuffix> is installed.
my $jar = HTTP::CookieJar::LWP->new;
my $ua = LWP::UserAgent->new( cookie_jar => $jar );
=item protocols_allowed
See L</"cookie_jar"> for more information.
This option allows you to whitelist the protocols you're willing to allow.
=head2 Managing Protocols
C<protocols_allowed> gives you the ability to whitelist the protocols you're
willing to allow.
my $ua = LWP::UserAgent->new(
protocols_allowed => [ 'http', 'https' ]
);
This will prevent you from inadvertently following URLs like
C<file:///etc/passwd>
=item protocols_forbidden
C<file:///etc/passwd>. See L</"protocols_allowed">.
This option allows you to blacklist the protocols you're unwilling to allow.
C<protocols_forbidden> gives you the ability to blacklist the protocols you're
unwilling to allow.
my $ua = LWP::UserAgent->new(
protocols_forbidden => [ 'file', 'mailto', 'ssh', ]
);
This will prevent you from inadvertently following URLs like
C<file:///etc/passwd>
=back
This can also prevent you from inadvertently following URLs like
C<file:///etc/passwd>. See L</protocols_forbidden>.
=head1 SEE ALSO
Expand Down

0 comments on commit 14f0a97

Please sign in to comment.