document contains no data
ron.peterson at yellowbank.com
ron.peterson at yellowbank.com
Mon Aug 18 15:15:30 EDT 2003
On Sun, Aug 17, 2003 at 09:10:03AM -0400, ron.peterson at yellowbank.com wrote:
> I'm giving this a rest for the weekend. If I make any progress with
> this, I'll post back to the thread.
Got it. The problem was with the redirect script. I had to eat the
request sent by the browser (the little while() loop..). I also removed
the html, since it wasn't really contributing anything. Works like a
charm.
#!/usr/bin/perl -w
# Name: http-redirect
# Author: Joe.Smith at MCI.com
# Modified: rpeterso at mtholyoke.edu
# Purpose: Dummy http daemon redirects browers to specified www host.
# Usage: Add "http 80/tcp" to /etc/services and add this to /etc/inetd.conf:
# http stream tcp nowait nobody /usr/local/etc/http-redirect host.domain.suf
# Set default host to use if not specified in inetd.conf
my $otherhost = @ARGV ? $ARGV[0] : "mill.mtholyoke.edu";
while(<STDIN>) {
chomp;
last if( /^\s*$/ );
}
my $message = <<EOM;
HTTP/1.1 302
Location: http://$otherhost/test/
Status: 302
Server: DUMMY/0.0
Content-type: text/html
EOM
$message =~ s/\n/\r\n/gm; # Convert to netascii form, CR+LF
print $message; # Tell the browser to go away
exit;
--
Ron Peterson -o)
87 Taylor Street /\\
Granby, MA 01033 _\_v
https://www.yellowbank.com/ ----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lists.blu.org/pipermail/discuss/attachments/20030818/8d921caf/attachment.sig>
More information about the Discuss
mailing list