Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    HTTP::Daemon::SSL 1.05_01

    Download button

    No screenshots available
    Downloads: 599  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.6/5)
    16 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Peter Behroozi | More programs
    Perl Artistic License / FREE
    May 8th, 2008, 15:18 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    HTTP::Daemon::SSL description

    A simple HTTP server class with SSL support.

    HTTP::Daemon::SSL is a simple HTTP server class with SSL support.

    SYNOPSIS

    use HTTP::Daemon::SSL;
    use HTTP::Status;

    # Make sure you have a certs/ directory with "server-cert.pem"
    # and "server-key.pem" in it before running this!
    my $d = HTTP::Daemon::SSL->new || die;
    print "Please contact me at: n";
    while (my $c = $d->accept) {
    while (my $r = $c->get_request) {
    if ($r->method eq 'GET' and $r->url->path eq "/xyzzy") {
    # remember, this is *not* recommened practice :-)
    $c->send_file_response("/etc/passwd");
    } else {
    $c->send_error(RC_FORBIDDEN)
    }
    }
    $c->close;
    undef($c);
    }

    Instances of the HTTP::Daemon::SSL class are HTTP/1.1 servers that listen on a socket for incoming requests. The HTTP::Daemon::SSL is a sub-class of IO::Socket::SSL, so you can perform socket operations directly on it too.

    The accept() method will return when a connection from a client is available. In a scalar context the returned value will be a reference to a object of the HTTP::Daemon::ClientConn::SSL class which is another IO::Socket::SSL subclass. In a list context a two-element array is returned containing the new HTTP::Daemon::ClientConn::SSL reference and the peer address; the list will be empty upon failure. (Note that version 1.02 erroneously did not honour list context). Calling the get_request() method on the HTTP::Daemon::ClientConn::SSL object will read data from the client and return an HTTP::Request object reference.

    This HTTPS daemon does not fork(2) for you. Your application, i.e. the user of the HTTP::Daemon::SSL is reponsible for forking if that is desirable. Also note that the user is responsible for generating responses that conform to the HTTP/1.1 protocol. The HTTP::Daemon::ClientConn class provides some methods that make this easier.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    HTTP server class | SSL support | Perl module | HTTP | SSL | daemon

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM