-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test requires HTTP::Daemon 6.05+ and use 127.0.0.1 or [::1] according to server's sockdomain #280
Conversation
@@ -3,7 +3,7 @@ use strict; | |||
use Test::More tests => 47; | |||
use lib qw( t t/local ); | |||
use LocalServer; | |||
use HTTP::Daemon; | |||
use HTTP::Daemon 6.05; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, we could also add this to TestRequires in dist.ini
: https://github.com/libwww-perl/WWW-Mechanize/blob/master/dist.ini#L26-L27
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently the prereq version for HTTP::Daemon is 0, but has be set to 6.05, otherwise tests will fail if older HTTP::Daemon is installed. Or alternatively skip tests if HTTP::Daemon version is < 6.05.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mentioned in the first comment, dzil build
will bump HTTP::Daemon prereq.
I intentionally did not do it because it would also give us unrelated diff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I manually bumped HTTP::Daemon in 68af39e
@skaji is this ready to merge? |
I have cherry-picked a commit from patch2 branch 7d796b8. @oalders If travis ci passes, I think this PR is ready to merge! |
The CPANtester who originally reported the bad interaction between HTTP::Daemon and WWW::Mechanize (causing his rigs to hang indefinitely) has reported to me that skaji's branch A new CPAN release is likely to resolve these 3 issues in your queue: Thank you very much. |
Thank you all for fixing this! The I'll look into updating the program in WWW::Mechanize from Test::HTTP::LocalServer if I have features that the WWW::Mechanize distribution needs. |
This comes from libwww-perl/WWW-Mechanize#280 Thanks to Shoichi Kaji for the code and Olaf Alders for the review
We saw some test failures related IPv4/IPv6 (eg #278 #272 #101).
Now HTTP::Daemon 6.05 uses IO::Socket::IP, and IO::Socket::IP takes care of IPv4/IPv6,
so we should use "localhost" notations and let IO::Socket::IP select IPv4/IPv6 automatically.
Note:
dzil build
will append "test requires HTTP::Daemon 6.05" to META.json, so I didn't add it in this PR.t/TestServer.pm
andt/cookies.t
still use127.0.0.1
notation. I hope we address them in another PR. ("localhost" is not a valid domain for cookies. So we cannot use "localhost" simply there)