Giter VIP home page Giter VIP logo

perl-net-epp's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

perl-net-epp's Issues

Issue with checking domain

I am utilizing following code:

        if ($epp->check_domain($domainToCheck) == 1) {
            print "Domain is available\n" ;
        
        } else {
            my $info = $epp->domain_info($domainToCheck);
            printf("Domain was registered on %s by %s\n", $info->{crDate}, $info->{crID});
        }
        

And i get the error:

Can't locate object method "check_domain" via package "epp" (perhaps you forgot to load "epp"?) at twhepp.pl line 56.
Wed Jun 12 12:41:44 2024 (93337): DESTROY() method called
Wed Jun 12 12:41:44 2024 (93337): logging out
Wed Jun 12 12:41:44 2024 (93337): sending a string to the server
Wed Jun 12 12:41:44 2024 (93337): C: <?xml version="1.0" encoding="UTF-8"?>
Wed Jun 12 12:41:44 2024 (93337): C: <epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
Wed Jun 12 12:41:44 2024 (93337): C:   <command>
Wed Jun 12 12:41:44 2024 (93337): C:     <logout/>
Wed Jun 12 12:41:44 2024 (93337): C:     <clTRID>05837103ae53674a3bbbc993230591633f89bc09</clTRID>
Wed Jun 12 12:41:44 2024 (93337): C:   </command>
Wed Jun 12 12:41:44 2024 (93337): C: </epp>
Wed Jun 12 12:41:44 2024 (93337): reading frame, waiting 5 seconds before timeout
Wed Jun 12 12:41:44 2024 (93337): setting timeout alarm for receiving frame
Wed Jun 12 12:41:44 2024 (93337): unsetting timeout alarm after successful receive
Wed Jun 12 12:41:44 2024 (93337): S: <?xml version="1.0" encoding="UTF-8" standalone="no"?>
Wed Jun 12 12:41:44 2024 (93337): S: <epp xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:ietf:params:xml:ns:epp-1.0" xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd">
Wed Jun 12 12:41:44 2024 (93337): S:   <response>
Wed Jun 12 12:41:44 2024 (93337): S:     <result code="1500">
Wed Jun 12 12:41:44 2024 (93337): S:       <msg>Command completed successfully; ending session</msg>
Wed Jun 12 12:41:44 2024 (93337): S:     </result>
Wed Jun 12 12:41:44 2024 (93337): S:     <trID>
Wed Jun 12 12:41:44 2024 (93337): S:       <clTRID>05837103ae53674a3bbbc993230591633f89bc09</clTRID>
Wed Jun 12 12:41:44 2024 (93337): S:       <svTRID>20240612144041095295-q4h3z5-reg1114-NORID</svTRID>
Wed Jun 12 12:41:44 2024 (93337): S:     </trID>
Wed Jun 12 12:41:44 2024 (93337): S:   </response>
Wed Jun 12 12:41:44 2024 (93337): S: </epp>
Wed Jun 12 12:41:44 2024 (93337): disconnecting from server

$epp variable are utilized with my $epp = Net::EPP::Simple->new(i removed the sensitive EPP credentials);
and i am using: use Net::EPP::Simple;

Connection with greeting fails in Net::EPP::Simple

I've just tested an upgrade to 0.26 (from 0.22) and have hit this showstopper with Net::EPP::Simple.

In the new version, Net::EPP::Simple->get_frame has this extra little check:

sub get_frame {
    my $self = shift;
    if (!$self->connected) {
        $self->debug('cannot get frame if not connected');
        $Code = COMMAND_FAILED;
        $Error = $Message = 'Not connected';
        return undef;
            
    } else {

Which seems reasonable. The problem comes when using $epp->connect () without the no-greeting param. In this case it is Net::EPP::Client->connect which is called and that ends with a call to $self->get_frame which perfoms the above check. But that will always fail because at no point in Net::EPP::Client->connect or the subs it calls is the value of 'connected' ever set.

I'm happy to submit a PR if you would like to suggest your preferred fix. Since the 'connected' key is only ever referred to in Net::EPP::Simple it might be best for it to have its own version of the connect method which sets the flag on success before retrieving the frame. But as I have only just started looking at this updated code it could also be better addressed elsewhere.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.