LWP::UserAgent and HTTP_ACCEPT



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 :-)

.



Relevant Pages

  • Re: fopen, fpassthru downloading
    ... > With total disregard for any kind of safety measures Steve ... >>it seems as though every header i try seems to work in firefox ... > of MIME types. ...
    (comp.lang.php)
  • Re: David Letterman Proves Culture War Is Real (says B.OR)
    ... Did you read the header to the page ("The Phil Silvers Show")? ... Silver's character on the show) and other aka's used for the show were ... Prev by Date: ...
    (alt.fan.letterman)
  • HELP! Cant copy using right-click
    ... all of the text is de-selected except for the header (ex. ... button is held down, only auto-text replacement suggestions. ... Aargh! ... Prev by Date: ...
    (microsoft.public.word.docmanagement)
  • Re: "From address" in Outlook rules
    ... I see no selection that allows you to go based on ... > header. ... Is there some advanced rule editor? ... Prev by Date: ...
    (microsoft.public.office.developer.outlook.forms)
  • Re: Jim Cramer - Mad "Profit" of the Airwaves
    ... Please quote enough of the previous message for context. ... Google, click "show options" and use the Reply shown in the expanded ... header. ... Prev by Date: ...
    (rec.arts.tv)