Now in Baidu WISE team
全部博文(150)
分类: Python/Ruby
2012-03-30 12:42:53
Question:
When I'm tring to download a page by LWP, I got such response:
You do not have permission to view this directory or page using the credentials that you supplied because your Web browser is sending a WWW-Authenticate header field that the Web server is not configured to accept.
By wireshark, I found there is such information in received packages.
WWW_Authenticate:Negotiate
WWW_Authenticate:NTLM
Solution:
Use the module LWP::Authen::Negotiate
~agrolms/LWP-Authen-Negotiate-0.08/lib/LWP/Authen/Negotiate.pm
or install by `sudo apt-get install liblwp-authen-negotiate-perl`
No code change is required, just install the module.
That's the sample on CPAN