From: jm Date: 2005-04-22T10:30:52+09:00 Subject: Re: Proxy Server troubles I gave it a quick run. I had to change local_host = nil so that it would bind and fixed the line wrap in the posted code. Telnetted to port 8080 on localhost and hit enter twice and it came back with a lot of html from slashdot. So it works on $ ruby -v ruby 1.8.1 (2003-12-25) [powerpc-darwin] Can't see anything obviously wrong. Do you have a transparent proxy or anything between you and the site as this can cause havoc? J. On 22/04/2005, at 10:54 AM, Tanner Burson wrote: > I've been working on a proxy server implementation for a project idea > I have. But I've found that it only seems to work on certain pages, > and not on others. I've distilled the problem down to a simple > implementation, but it still occurs. The code below will return a > (mostly) correct website if pointed at 'www.msn.com' but if pointed at > say 'slashdot.org' the browser refuses to display it, in both cases > the page is loaded correctly. If anyone has any ideas I'd really > appreciate it. > > ===proxy.rb > > require 'socket' > require 'net/http' > local_host = '192.168.0.6' > local_port = 8080