-
Notifications
You must be signed in to change notification settings - Fork 61
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
http-config.t failures (caused by URI 1.75) #121
Comments
Well, it's not random, it's caused by the newest URI.pm. Statistical analysis:
|
Thanks. I can replicate this locally. |
This reverts commit c77b2bc. This was breaking tests for HTTP::Config. See libwww-perl/HTTP-Message#121
I just reverted the changes to |
Okay I think I see what's going on: HTTP::Request::uri_canonical is cached, and only ever overwritten when a subsequent call to sub uri_canonical
{
my $self = shift;
return $self->{'_uri_canonical'} ||= $self->{'_uri'}->canonical;
} The test rewrites the URI scheme which will not be reflected in the memoized is(j($conf->matching_items($request)), "u:p|slash|.com|GET|not secure|always");
$request->method("HEAD");
$request->uri->scheme("https");
is(j($conf->matching_items($request)), ".com|GET|secure|always"); I have created a patch to |
I'd also consider this a bug fix, because in the case where the URI is not already canonical, the cached version would become out of sync when the original one is changed. (could this be tested for?) |
A latent bug perhaps. The ostensible reason why it never surfaced was likely because the URI would have been minted as canonical (or at least canonical-ish) in the test, which Indeed, however, prior to patch #123, the raw URI and the canonical URI could fall out of sync if for some reason the URI in the |
I observe the following kind of failures on some of my smokers:
This seems to happen also on other systems, for example: http://www.cpantesters.org/cpan/report/34a5f0ee-13ca-11e9-8c82-aba07c4588f0
The text was updated successfully, but these errors were encountered: