Blank content-length?

Hi,

The Content-Length http response header is blank. Anyone see that occur?

My controller is sending back xml from a Zaya graph. Everything works
fine on FF but it appears that IE wants the HTTP specification followed.
(Not so unreasonable.)

Controller and Ethertrace are below.

Thoughts much appreciated.

Thanks and regards,

Larry

My controller for the graph is:

def a_graph
# assumes param :set
response.headers[“Cache-Control”] = “no-cache”
chart_id = params[:set]
stats = Statistics.new
stats.fetch_stats(chart_id.to_sym)

graph  = Ziya::Charts::Column.new( nil, nil, chart_id )
graph.add( :axis_category_text, stats.series_labels )
graph.add( :series, "Series A", stats.series )

render :text => graph

end

GET /a_graph/thursday_registered HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Accept: text/xml,application/xml,application/xhtml+xml,text/
html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

Response:
HTTP/1.1 200 OK
Date: Fri, 07 Sep 2007 17:52:41 GMT
Server: Apache/1.3.37 (Unix) mod_throttle/3.1.2 DAV/1.0.3 mod_fastcgi/
2.4.2 mod_gzip/1.3.26.1a PHP/4.4.7 mod_ssl/2.8.22 OpenSSL/0.9.7e
Set-Cookie: _am3_session_id=247b8f94aca3b73c90c8496194c3cb08; path=/
Cache-Control: no-cache
Content-Length: <<=== This is a problem. It is not per the http
spec
Keep-Alive: timeout=2, max=99
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8

<chart_type>column</chart_type><axis_category alpha=“100”
size=“20” bold=“true” color=“0”/><axis_ticks major_color=“54544c”
minor_color=“a19d91” value_ticks=“false”/><axis_value alpha=“100”
size=“15” color=“0”/><chart_rect/><chart_border bottom_thickness=“3”
left_thickness=“1” right_thickness=“0” top_thickness=“0”/

<chart_grid_h alpha=“20” thickness=“1” color=“0”/><chart_grid_v
… etc …

Larry K. wrote:

Thoughts much appreciated.
chart_id = params[:set]
GET /a_graph/thursday_registered HTTP/1.1

Connection: Keep-Alive
Content-Type: text/html; charset=utf-8

<chart_type>column</chart_type><axis_category alpha=“100”
size=“20” bold=“true” color=“0”/><axis_ticks major_color=“54544c”
minor_color=“a19d91” value_ticks=“false”/><axis_value alpha=“100”
size=“15” color=“0”/><chart_rect/><chart_border bottom_thickness=“3”
left_thickness=“1” right_thickness=“0” top_thickness=“0”/

<chart_grid_h alpha=“20” thickness=“1” color=“0”/><chart_grid_v
… etc …

My guess is that graph.size doesn’t return a value or returns an “empty”
one.

Have you tried something like?:

render :text => graph.to_s


Michael W.

Thank you Michael!

That was it.

Thanks again and regards from New York City,

Larry

Michael W. wrote:

Have you tried something like?:

render :text => graph.to_s


Michael W.