I have a perl 'gateway' running on my webserver passing all data through to an application server. The received data is send to the webserver. It works well with html data (text) but receiving binary data (images) does not work:
use IO::Socket;
$envString=GetEnvVariables();
$remote=IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>'127.0.0.1', PeerPort=>'1099') or ShowError("[1099] Can't connect to server");
$remote->autoflush(1);
#
# Send data to the application server
#
print $remote $envString;
#
# Retrieve data from the application server and send it back to
# the web-server
#
while(<$remote>){print;
}
close($remote);
The mimetypes are send correctly (content-type header).
albert
use IO::Socket;
$envString=GetEnvVariables();
$remote=IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>'127.0.0.1', PeerPort=>'1099') or ShowError("[1099] Can't connect to server");
$remote->autoflush(1);
#
# Send data to the application server
#
print $remote $envString;
#
# Retrieve data from the application server and send it back to
# the web-server
#
while(<$remote>){print;
}
close($remote);
The mimetypes are send correctly (content-type header).
albert