Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8250987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:05:33+00:00 2026-06-08T00:05:33+00:00

I have a http server that uses the module HTTP::AppServer from cpan. I can

  • 0

I have a http server that uses the module HTTP::AppServer from cpan.

I can connect to my server using 127.0.0.1 or localhost, while it miserably fails with ::1.

Here are some example with curl:

$ curl http://127.0.0.1:8080/index.html
This is a test.
$ curl -g http://[::1]:8080/index.html
curl: (7) couldn't connect to host

This is how the server is started:

use HTTP::AppServer;
use IO::Socket::IP -register;

  my $server = HTTP::AppServer->new( StartBackground => 0, ServerPort => 8080 );

  $server->plugin('FileRetriever', DocRoot => '/tmp');

  $server->start; 

Actually it is a lot more complicated. But it I don’t think all the rest of the script is necessary. I’ve added the module IO::Socket::IP and upgraded the module Socket to the version found here in order to make IO::Socket::IP to work.

Still, It doesn’t work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:05:34+00:00Added an answer on June 8, 2026 at 12:05 am

    After LeoNerd saying that IO::Socket::IP can’t help me in this situation, I’ve found an alternative solution, although this solution works only with some perl version.

    HTTP::AppServer is based on HTTP::Server::Simple and I found on cpan a newer version of this second module that supports ipv6.

    First of all you need to download the newer version of HTTP::Server::Simple here:

    http://metacpan.org/pod/HTTP::Server::Simple

    As you can see, it has a different new method that accept a new argument family.

    Now you have to take the HTTP::AppServer.pm and modify the init function from

    sub init
    {
        my ($self, %opts) = @_;
    
        # server options defaults
        my %defaults = (StartBackground => 0, ServerPort => 3000);
    
        # set options or use defaults
        map { $self->{$_} = (exists $opts{$_} ? $opts{$_} : $defaults{$_}) }
            keys %defaults;
    
        $self->{'server'} = HTTP::AppServer::Base->new($self->{'ServerPort'});
    
        return $self;
    }
    

    to

    sub init
    {
        my ($self, %opts) = @_;
    
        # server options defaults
        my %defaults = (StartBackground => 0, ServerPort => 3000);
    
        # set options or use defaults
        map { $self->{$_} = (exists $opts{$_} ? $opts{$_} : $defaults{$_}) }
            keys %defaults;
    
        $self->{'server'} = HTTP::AppServer::Base->new($self->{'ServerPort'}, Socket::AF_INET6);
    
        return $self;
    }
    

    Unfortunately, this answer the question, but not my problem because it doesn’t work with perl 5.8.8 also upgrading Socket.pm to the latest version.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small app that downloads some files from a remote (HTTP) server
I have an app that communicates with a server that uses HTTP Digest authentication.
Alright, I have a server that serves a motion-jpeg stream over http. What I
I have my Apache http server running on localhost:80 and restlet server on localhost:8182,
I have an excel workbook which needs to query data from an HTTP server.
I am using indy's http server for a project so i have a few
I have a homework assignment that I am supposed to write a http server
I'm trying to send a URL to my server that uses values from edittext
I have a web application that uses a local SQL Server Express database (a.k.a.
I have an iPhone application I've been using for some time that uses ASIHTTPRequest

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.