Webrick server / ie6 truncate javascript files in development mode

I am using webrick to run my rails application in development mode. The page contains 4-5 javascript files, which are also served by the same webrick instance.

When I load the page on ie6 it seems that the javascript files are truncated after the first few lines - can anyone explain this? for example if the page contains this script tag:

<script type="text/javascript" src="http://myserver:3200/javascripts/jquery.js"></script>

      

When the page is loaded in ie6 it throws a javascript syntax error and Visual Web Developer (VWD) lets me open the jquery.js file I downloaded, it only shows the first 30 lines and then just stops.

On the same machine running ie6, I tried to load the same jquery.js w / curl file:

% curl --verbose "http://myserver:3200/javascripts/jquery.js"
* About to connect() to myserver port 3200 (#0)
*   Trying xx.xx.xx.xx... connected
* Connected to myserver (xx.xx.xx.xx) port 3200 (#0)
> GET /javascripts/jquery.js HTTP/1.1
> User-Agent: curl/7.16.3 (i686-pc-cygwin) libcurl/7.16.3 OpenSSL/0.9.8j zlib/1.2.3 libssh2/0.15-CVS
> Host: myserver:3200
> Accept: */*
> 
< HTTP/1.1 200 OK
< Connection: close
< Date: Thu, 14 May 2009 21:35:09 GMT
< Content-Length: 
< Last-Modified: Wed, 13 May 2009 20:38:23 GMT
< Content-Type: application/javascript
< 
* Closing connection #0

      

Therefore, I am not getting any content from the server when accessing the page through curl. The same w / wget.

However, if I load the page or even individual javascript files in firefox or chrome, it loads the whole thing completely. So there is some weird interaction between webrick and ie6, same w / curl / wget. Another test I tried:

% telnet myserver 3200
GET /javascripts/jquery.js HTTP/1.1
Accept: */*

HTTP/1.1 200 OK
Connection: close
Date: Thu, 14 May 2009 21:43:01 GMT
Content-Length:
Last-Modified: Wed, 13 May 2009 20:38:23 GMT
Content-Type: application/javascript

/*!
 * jQuery JavaScript Library v1.3.2
....

      

It worked, returned the complete file. I am at a loss to explain why it is not loading in ie6 / curl / wget. Any suggestions?

0


a source to share


2 answers


hmm ... "gem install mongrel" and restart script / server and suddenly it works. Obviously it was a webrick issue fixed using mongrel instead.



0


a source


An empty title Content-Length

could be the culprit. I would focus my efforts on figuring out why Webrick is not returning content length.



0


a source







All Articles