Hi ,
I have a small problem with HTTP::Response. The problem is not
with the module but with my implementation . Let me tell u my problem ...
I am writing a proxy server in perl using LWP which has a capability to
reduce image sizes i.e., i would like to change the format of the image to
a format that has less file size ... Changing image formats wasn't any
problem to me ... But the actual problem was in the response to the client
using HTTP::Response ... i have the image whose format was changed ,on
disk ... How do i put this in the response
Lets say
The sample code like this
----------------------------------------------
# fetching the actual image
my $response = $AGENT->request($request);
my $type = $response->header('content-type');
# if this $type is of the format image/xxxxx
# i consider the content as image and save to disk
$response->content();
# and manipulate to JPEG format .if i fina image is final.jpeg
# using ImageMagick Perl modules ...
# which is on disk how do i put it in response
i can change header as
$response->header('content-type' =>'image/jpeg');
then how do i the image file in $response->content();
Can Any body suggest me a method put it .... Please ... I am novice to LWP
.
-------------------------------------------------------------------