Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: How to display the response from a get request to a browser?

by elwarren (Curate)
on Oct 27, 2004 at 16:04 UTC ( #403073=note: print w/replies, xml ) Need Help??


in reply to How to display the response from a get request to a browser?

You need to return 'Content-type: image/jpeg' in your headers. Some clients will break with your Content-Length: 0 as well.

If you use CGI; it can help make alot of these tasks easier, but content-type is what you need to fix this problem. Text works fine because text/html is the browser's default.

HTH
  • Comment on Re: How to display the response from a get request to a browser?

Replies are listed 'Best First'.
Re^2: How to display the response from a get request to a browser?
by elwarren (Curate) on Oct 27, 2004 at 16:12 UTC
    Nevermind, I just realized this is client-side, not server-side.

    If your goal is just to display images from webservers, you might want to check out the feh tool. It kicks the butt of display. You can point it at a url and it will handle all of the download and display. It also has a param to automatically refresh/reload after x seconds. I use it to fullscreen a remote webcam on my setup at home and it's brilliant.

    HTHM
      ok, I went the feh website and downloaded the first one in the download list:
      Get feh-1.2.7.tar.gz here.
      now, where should I put the downloaded .tar file.
      and how do I use it the perl code.

      do I store the resulted set of charatere in a file and pass it the feh or what. Thank you for the effort.
      unb

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://403073]
help
Chatterbox?
[GotToBTru]: 99% of all deaths take place within 24 hours of ingesting di-hydrogen monoxide
[GotToBTru]: time for some C8H10N4O2 for me
[ambrus]: GotToBTru: wait, you tell only the atom totals of what you want? Is that like ordering food in a restaurant by telling only the nutrient amounts you need, or
[ambrus]: like when a medieval scientist supposedly proves his priority inventing something by having previously published an anagram of a thousand letters long summary of the invention?

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2016-12-06 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (104 votes). Check out past polls.