Skip to content

Commit e7581ed

Browse files
committed
modified: lib/WWW/PipeViewer.pm -- set the default HTTP headers in one call
1 parent f7da844 commit e7581ed

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/WWW/PipeViewer.pm

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,13 @@ sub set_lwp_useragent {
331331
};
332332

333333
$agent->ssl_opts(Timeout => $self->get_timeout);
334-
$agent->default_header('Accept-Encoding' => $accepted_encodings);
335-
$agent->default_header('Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8');
336-
$agent->default_header('Accept-Language' => 'en-US,en;q=0.5');
337-
$agent->default_header('Connection' => 'keep-alive');
338-
$agent->default_header('Upgrade-Insecure-Requests' => '1');
334+
$agent->default_header(
335+
'Accept-Encoding' => $accepted_encodings,
336+
'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
337+
'Accept-Language' => 'en-US,en;q=0.5',
338+
'Connection' => 'keep-alive',
339+
'Upgrade-Insecure-Requests' => '1'
340+
);
339341
$agent->proxy(['http', 'https'], $self->get_http_proxy) if defined($self->get_http_proxy);
340342

341343
my $cookie_file = $self->get_cookie_file;

0 commit comments

Comments
 (0)