For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > January 2006 > LWP::UserAgent and HTTP_ACCEPT









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author LWP::UserAgent and HTTP_ACCEPT
John Bokma

2006-01-24, 6:56 pm

I want to accept only certain mime types with LWP::UserAgent. What is the
most failsafe way to do this? I doubt that sending an accept header is
100% safe, so I was thinking about setting up a callback which checks the
content-type(s) and dies if none is acceptable (probably in combination
with setting the HTTP_ACCEPT header beforehand).

Has anyone done this before, and is this a good way to do this?

--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
I ploink googlegroups.com :-)

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com