[wsf-c-dev] [jira] Created: (WSFRUBY-70) Remove Hardcoding to Rails::CGIRequest
Jürgen Mangler (JIRA)
jira at wso2.org
Sun Jan 18 14:24:04 PST 2009
Remove Hardcoding to Rails::CGIRequest
--------------------------------------
Key: WSFRUBY-70
URL: https://wso2.org/jira/browse/WSFRUBY-70
Project: WSO2 WSF/Ruby
Issue Type: Improvement
Components: WSService
Affects Versions: Current (nightly)
Environment: Linux
Reporter: Jürgen Mangler
Assignee: Dimuthu Gamage
Priority: High
Attachments: wsf.patch
I'm not quite content with the state of the ruby code, especially that Rails is hardcoded. I think
the code should be more generic:
* There is not only rails, there is a multitude of other popular frameworks like merb, ramaze, ...
* Rails will soon be using rack, which means changing the C code, as it is not flexible
* In most of the cases best performance will be with direct binding to web server (also e.g. through rack)
* The server examples will be much easier to follow/toss around with, when they are not depending on rails but are standalone.
Attached a patch, that does the following modifications:
static VALUE wsservice_reply(VALUE self, VALUE request_headers, VALUE request_body)
* reply has only 2 input parameters, request_headers as hash, request body as string.
* reply return an array[3]: status as fixnum, response_headers as hash, response_body as string
** status is no longer a header
This results in a call similar to: status, headers, body = @wss.reply(req.env,req.body.read)
This very well changes the way rails and other frameworks invoke wsservice. I can make changes to the samples directory (new samples) if the patch is appreciated.
How to apply the patch: cd wsservice; patch -p0 < wsf.patch
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://wso2.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the Wsf-c-dev
mailing list