in reply to Why is my image obtained by LWP displayed as garbage (i.e. plain/text)?
If you're only interested in images, you can do:
#!/usr/bin/perl -T use CGI::Carp qw(fatalsToBrowser); use CGI qw(:standard); $url = param('name'); print header; print start_html('My Remote Webpage Request Service'); print qq(<img src="$url">); print end_html;
If you want different content types, you should take care of the url's content-type header and respond accordingly.
update: I'm ignoring potential security issues here, since that would make the whole program a lot more complex.
|
|---|