From: Sam Joseph Date: 2006-02-08T23:16:05+09:00 Subject: Re: odd http header corruption Hi Zev, Zev Blut wrote: > 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. Indeed I have suspected as much. > I would grep your code for an "inspect" and if that fails "puts". I had already done so - I have no "puts" or "print" outside my test classes, and no inspects outside of my logging code. I've used the eclipse search function to scan all the code, and find | xargs grep on the server. The only things that I can imagine being remotely responsible are things like: ./app/models/message.rb: raise "more than one read_message for this user/message pair #{self.inspect}, #{user.inspect}" and ./app/controllers/application.rb: logger.info 'error during workspace log: ' + e.inspect but these wouldn't affect stdout right? I'm sure there must be something dumping that information somewhere, but I can't find it in my code, or in rails code, and more disturbingly to me, I can't work out where in the rails code the first part of the http header is generated, i.e. 'HTTP/1.x 200 OK', since the first call to output in cgi_process.rb is: output.write(@cgi.header(@headers)) and @cgi.header(@headers) doesn't produce the first three lines of the http header as far as I can see, yet there are no other calls to output anything before that. Anyhow, I've worked around the problem by printing a new line before the @cgi.header(@headers) is printed, which has fixed things for the time being. CHEERS> SAM