mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-18 06:20:41 +01:00
WebPaste: restart alarm after pasting with UA::Paranoid
This commit is contained in:
parent
623ed7d317
commit
9d1cdef881
@ -81,6 +81,7 @@ sub paste_ixio {
|
|||||||
push @{ $ua->requests_redirectable }, 'POST';
|
push @{ $ua->requests_redirectable }, 'POST';
|
||||||
my %post = ('f:1' => $text);
|
my %post = ('f:1' => $text);
|
||||||
my $response = $ua->post("http://ix.io", \%post);
|
my $response = $ua->post("http://ix.io", \%post);
|
||||||
|
alarm 1; # LWP::UserAgent::Paranoid kills alarm
|
||||||
return "error pasting: " . $response->status_line if not $response->is_success;
|
return "error pasting: " . $response->status_line if not $response->is_success;
|
||||||
my $result = $response->content;
|
my $result = $response->content;
|
||||||
$result =~ s/^\s+//;
|
$result =~ s/^\s+//;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user