I'm hoping that this is something obvious, but frankly it's a little puzzling for me. This is a server I set up last month, and now that it's time to expand the library of Perl modules, I'm having an unexpected error from cpan:

$sudo cpan install LWP::UserAgent Loading internal null logger. Install Log::Log4perl for logging messag +es Reading '/home/web/.cpan/Metadata' Database was generated on Mon, 05 Feb 2018 20:17:03 GMT Fetching with HTTP::Tiny: http://www.cpan.org/authors/01mailrc.txt.gz HTTP::Tiny failed with code[403] message[Forbidden: header 'Content-Ty +pe' value denied] Trying with /usr/bin/wget -O "/home/web/.cpan/sources/authors/01mailrc.txt.gz. +tmp16849" to get http://www.cpan.org/authors/01mailrc.txt.gz --2018-03-01 10:37:25-- http://www.cpan.org/authors/01mailrc.txt.gz Resolving www.cpan.org (www.cpan.org)... 151.101.194.49, 151.101.130.4 +9, 151.101.66.49, ... Connecting to www.cpan.org (www.cpan.org)|151.101.194.49|:80... connec +ted. HTTP request sent, awaiting response... 403 Forbidden: header 'Content +-Type' value denied 2018-03-01 10:37:25 ERROR 403: Forbidden: header 'Content-Type' value +denied. Function system("/usr/bin/wget -O "/home/web/.cpan/sources/authors +/01mailrc.txt.gz.tmp16849" "http://www.cpan.org/authors/01mailrc.txt. +gz" ") returned status 8 (wstat 2048), left /home/web/.cpan/sources/authors/01mailrc.txt.gz.tmp16849 with size 0 Warning: no success downloading '/home/web/.cpan/sources/authors/0 +1mailrc.txt.gz.tmp16849'. Giving up on it.

If I try just doing a wget on the file, I get pretty much the same thing:

$ wget --debug http://www.cpan.org/authors/01mailrc.txt.gz >foo.gz DEBUG output created by Wget 1.19.1 on linux-gnu. Reading HSTS entries from /home/web/.wget-hsts URI encoding = ‘UTF-8’ Converted file name '01mailrc.txt.gz' (UTF-8) -> '01mailrc.txt.gz' (UT +F-8) --2018-03-01 11:02:48-- http://www.cpan.org/authors/01mailrc.txt.gz Resolving www.cpan.org (www.cpan.org)... 151.101.194.49, 151.101.130.4 +9, 151.101.66.49, ... Caching www.cpan.org => 151.101.194.49 151.101.130.49 151.101.66.49 15 +1.101.2.49 2a04:4e42:600::561 2a04:4e42:400::561 2a04:4e42:200::561 2 +a04:4e42::561 Connecting to www.cpan.org (www.cpan.org)|151.101.194.49|:80... connec +ted. Created socket 3. Releasing 0x00005625bd526e10 (new refcount 1). ---request begin--- GET /authors/01mailrc.txt.gz HTTP/1.1 User-Agent: Wget/1.19.1 (linux-gnu) Accept: */* Accept-Encoding: identity Host: www.cpan.org Connection: Keep-Alive ---request end--- HTTP request sent, awaiting response... ---response begin--- HTTP/1.0 403 Forbidden: header 'Content-Type' value denied Content-type: text/html; charset="iso-8859-1" ---response end--- 403 Forbidden: header 'Content-Type' value denied Registered socket 3 for persistent reuse. URI content encoding = ‘"iso-8859-1"’ ] done. 2018-03-01 11:02:48 ERROR 403: Forbidden: header 'Content-Type' value +denied.

It seems like it's trying to use a content type of text/html to get a zip file -- which is obviously wrong. But this is a new server, without any weird fancy configuration. Can someone suggest something? Thanks.

Update at 1158 ET: It seems there might be a host problem:

Err:4 http://ca.archive.ubuntu.com/ubuntu artful/main amd64 perl-opens +sl-defaults amd64 3 403 Forbidden: header 'Content-Type' value denied [IP: 91.189.88.15 +2 80] Err:5 http://ca.archive.ubuntu.com/ubuntu artful/universe amd64 libcry +pt-ssleay-perl amd64 0.73.04-2build1 403 Forbidden: header 'Content-Type' value denied [IP: 91.189.88.15 +2 80]
I wonder if this host is mis-configured.

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.


In reply to Content-type error trying to run cpan by talexb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.