[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

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

Zed A. Shaw

2/18/2006 9:09:00 PM

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.ruby...


== 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.ze...




7 Answers

_blackdog

2/18/2006 9:27:00 PM

0

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

Zed A. Shaw

2/18/2006 9:48:00 PM

0

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.ze...



On 2/18/06 4:28 PM, "_blackdog" <rmt512@gmail.com> wrote:

> 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
>
>



Zed A. Shaw

2/18/2006 9:57:00 PM

0

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.ze...

On 2/18/06 4:28 PM, "_blackdog" <rmt512@gmail.com> wrote:

> 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
>
>



_blackdog

2/18/2006 10:19:00 PM

0

nice one laddie!

works for me.

proxy fix and I'm all set :)

cheers

BD

(Mike Mitchell)

11/4/2013 6:37:00 AM

0

On Sun, 3 Nov 2013 18:09:38 -0500, "CoderX" <coder@x.com> wrote:

>Should have registered those controls AFTER reinstalling and doing service
>packs. All the uninstall/reinstall invalidated those actions.

Is this a problem that has recently started to occur on many systems
due to Microsoft Security Updates?

I am using XP. Do you know whether this has the same problem?

So far, I haven't noticed any such problems.

MM

-mhd

11/4/2013 3:36:00 PM

0

MM <kylix_is@yahoo.co.uk> wrote:
>
>Is this a problem that has recently started to occur on many systems
>due to Microsoft Security Updates?

I have to manually approve OS updates so one never sneaked through in the middle
of the night in my case.

-mhd

Coder X

11/4/2013 7:30:00 PM

0


"MM" <kylix_is@yahoo.co.uk> wrote in message
news:33ge79hl3eo9spqvqap28u5jm10h0dpgq3@4ax.com...
> Is this a problem that has recently started to occur on many systems
> due to Microsoft Security Updates?
>
> I am using XP. Do you know whether this has the same problem?
>
> So far, I haven't noticed any such problems.

Not sure. I still use XP for the most part, and sometimes 7 (not 8, no
thanks). I've not run into these kinds of things. That being said, the
rich control and the common control are wrappers for thei respective DLL
files. So if those files missing, there could be problems. Also, the
registration of those files under 64 bit OS need to be done with the 32 bit
version of regsvr as they are 32 bit, not the 64 bit one. Perhaps that was
an issue?

Typically, reinstalling seems to fix these things.

The only time I ever had a regsitration problem with a component was when
it's dependency was missing (the MSVC++ mess)...but that wouldn't be an
issue with the rich control and the common control.