[Rt-commit] rtir branch 5.0-releng/whois-command-crlf created. 5.0.4beta1-1-g52f6458d

BPS Git Server git at git.bestpractical.com
Thu May 4 13:03:39 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rtir".

The branch, 5.0-releng/whois-command-crlf has been created
        at  52f6458dfe4abf27cb547ef08d061743b567c00c (commit)

- Log -----------------------------------------------------------------
commit 52f6458dfe4abf27cb547ef08d061743b567c00c
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu May 4 20:56:49 2023 +0800

    End WHOIS commands with CRLF as RFC 812 dictates
    
    Some WHOIS servers like "PIR" do not support the nonstandard "\n" or
    "\n\n" any more and could cause RT web server to hang as they assume the
    command was incomplete and continue waiting.

diff --git a/lib/Net/Whois/RIPE.pm b/lib/Net/Whois/RIPE.pm
index d01155a8..d04833a7 100644
--- a/lib/Net/Whois/RIPE.pm
+++ b/lib/Net/Whois/RIPE.pm
@@ -116,7 +116,7 @@ sub query_iterator {
         return undef;
     }
 
-    return Net::Whois::RIPE::Iterator->new( $self, $string . "\n\n" );
+    return Net::Whois::RIPE::Iterator->new( $self, $string . "\r\n" );
 }
 
 sub template {
@@ -134,7 +134,7 @@ sub template {
         return undef;
     }
 
-    return $self->_query( $string . "\n\n",
+    return $self->_query( $string . "\r\n",
         "Net::Whois::RIPE::Object::Template" );
 }
 
@@ -153,7 +153,7 @@ sub verbose_template {
         return undef;
     }
 
-    return $self->_query( $string . "\n\n",
+    return $self->_query( $string . "\r\n",
         "Net::Whois::RIPE::Object::Template" );
 }
 
@@ -186,7 +186,7 @@ sub query {
         return undef;
     }
 
-    my @object = $self->_query( $string . "\n", "Net::Whois::RIPE::Object" );
+    my @object = $self->_query( $string . "\r\n", "Net::Whois::RIPE::Object" );
 
     $self->{cache}->set( $string, \@object ) if $self->{cache} and @object;
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
rtir


More information about the rt-commit mailing list