[ANN] Mongrel 0.3.5 -- Rails/CGI Actually Works

Z

Zed Shaw

This release of Mongrel features a CGIWrapper that actually works. The
previous code was complete garbage so this one should fix the problems with
sessions, cookies, and content-types people reported previously.

There is also now a correctly built Win32 gem created by Luis Lavena. Luis
joined the Mongrel project and will be working on the Win32 specific gear
needed. His first thing is going to be a Mongrel service so you can
start/stop Mongrel like other web servers on Win32.

Grab the goods at http://mongrel.rubyforge.org/


== What Is Mongrel

Mongrel is a fast HTTP library and server for Ruby that is intended for
hosting Ruby web applications of any kind using plain HTTP rather than
FastCGI or SCGI. It is framework agnostic and already supports Ruby On
Rails, Og+Nitro, and Camping frameworks.


== Changes for 0.3.5

* More correct CGIWrapper that should work with all CGI parameters and any
additional ones you set as well as properly converting cookies.
* Content-types and sessions should be fixed now.
* Fix to DirHandler that caused it to not list directories if told to.

Win32 people will still have problems with CTRL-C not stopping mongrel, but
Luis is tracking that down as part of his win32 service work.


== Getting Mongrel

You can get Mongrel via RubyGems just make sure you pick the win32 gem if
you are on that platform. You can use the regular gem if you have your own
compiler.

For those not familiar with RubyGems refer to the Mongrel site for help
(it's right on the front page).


== Toward 0.4

This release is getting closer to complete Ruby on Rails support. It should
work well, but file upload/send will probably function very weirdly if at
all.

The next release will focus on getting the win32 service working and
enabling all the little things like file upload/send, built-in page caching
support, and other goodies. People running Rails should shoot me feature
requests along these lines.


Zed A. Shaw
http://www.zedshaw.com/
 
B

_blackdog

hi Zed
Sorry to be the bearer of bad news.

The proxy issue is still ocurring, as is the "Wrong Content-type:"
error returned when using webservices (xmlrpc) with 0.3.5

FYI, I tried the web service request from a webrick and mongrel server
and they both interpreted the Wrong Content-type, so the problem is not
in the parsing of requests but the creation of responses, but maybe
that is totally obvious :)

thanks for your efforts

BD
 
Z

Zed Shaw

Ok, let me look at the wrong content-type. Problem is that I have a handler
which sets the content type just fine, so I'm thinking that the WS stuff
must be doing something else.

The proxy stuff will still be broken until I can add a setting for "the real
server".

Zed A. Shaw
http://www.zedshaw.com/
 
Z

Zed Shaw

Ah yes, very clever stuff going on here in CGI land. Take a look at this
dump of what is passed to the "head" method.
head: {}
options: {"Status"=>"200 OK", "type"=>"text/xml", "cookie"=>[],
"Cache-Control"=>"no-cache", "X-Zed"=>"dabomb"}
<<<<head: {"Status"=>"200 OK", "cookie"=>[], "Cache-Control"=>"no-cache",
"Server"=>"Mongrel 0.3.5", "Content-Type"=>"text/xml", "X-Zed"=>"dabomb"}
options: "text/html"
<<<<

It's basically a problem with both the head() and out() methods defaulting
to "text/html" as their content type so it gets reset when the output is
sent on. If you change 629 of mongrel.rb to be:

@head['Content-Type'] = options unless @head['Content-Type']

Then that will fix it. This also means that it will default to the first
content-type set. I'll pack that up into a fix for a release tomorrow or
later tonight. Let me know if that works.

Proxy stuff coming soon.

Zed A. Shaw
http://www.zedshaw.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top