From: Zev Blut Date: 2006-02-08T13:17:13+09:00 Subject: Re: odd http header corruption Hello Sam, On Wed, 08 Feb 2006 02:45:27 +0900, Sam Joseph wrote: > headers = @cgi.header(@headers) > headers.slice!(/#<#<(C|c)lass: 0x[\w\d]*>:0x[\w\d]*>/) > output.write(headers) > > [Snip more info] > > testing that my regex really did match the offending string. > suggesting to me that the problem was being introduced at a different > stage ... However, superficially I cannot work out how this set of > headers is actually transformed into the headers we see in the HTTP > header itself which looks like this: > > HTTP/1.x 200 OK > Date: Tue, 07 Feb 2006 13:59:08 GMT > Server: Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-16 > #<#:0x40bdaf2c>Content-Type: text/html > Cache-Control: no-cache > Set-Cookie: _session_id=936ba003910da551a472708d4b7b3ff3; path=/ > Keep-Alive: timeout=15, max=100 > Connection: Keep-Alive > Transfer-Encoding: chunked > Content-Type: text/plain This looks like you have a "puts someobj.inspect" in your code. Depending upon how you are running your system this rogue puts is being called before the header output and is going directly to the output stream. This is why your attempt to cut it out does not work. I would grep your code for an "inspect" and if that fails "puts". Hopefully, that show you where the problem is. Cheers, Zev