From: Andreas Schwarz Date: 2004-08-22T08:50:47+09:00 Subject: Re: Idea: Webshare Patrick May wrote: > P.S. About the only cgi design suggestion I see on ruby-talk that > I outright disagree with is Request / Response. > > I experimented with this in Narf, and I think it is a mistake. You end > up with two objects, with alot of shared implementation code I strongly disagree. Request and response are two completely different things; that their implementations _might_ have shared code (though I can't see where) doesn't mean that they have shared data. You receive a request object that contains the request method, URL, form parameters, cookies and headers, and you create a response object that consists of the body, cookies and headers and send it back to the server; the data of both objects has nothing in common. Example: if request.params['password'] = 'xyz' response.header['Content-Type'] = 'text/plain' response.cookies << { 'session_id' => 'abcde' } response.body = 'logged in' end I really can't see how a combined request/response object would make any sense here.