I was tinkering with xmlrpc today and as always was stunned by the high quality library shipped with ruby. Problem i ran into was that the ruby CGI lib steals the raw post data and tries to make a hash out of it. Its possible to convert the key of the first parameter back to a string and send this to the xmlrpc processor but It seems that hash keys have a max length of 1024. So here is a little include file which adds a raw_post method to the @request object listing cgifix.rb: http://rafb.net/paste/results/nZsui045.html P.S: I love open classes. -- Tobi http://www.hieraki.org - Open source book authoring http://blog.leetsoft.com - Technical weblog
Hi Tobias, good to hear that I am not the only one who fiddles about xmlrpc :-) Altough I had no problems so far with my approach as suggested on my weblog (http://woeye.highteq.net/blog/details/81), even with larger images, it''s clearly a better idea to give access to the raw data. bitsweat added support for raw access as well: http://dev.rubyonrails.com/ticket/505. So in 0.9.5 it will be possible to add xmlrpc support without any funny hacks :-) Yours, Lars Am 20.01.2005 um 06:18 schrieb Tobias Luetke:> I was tinkering with xmlrpc today and as always was stunned by the > high quality library shipped with ruby. > > Problem i ran into was that the ruby CGI lib steals the raw post data > and tries to make a hash out of it. Its possible to convert the key of > the first parameter back to a string and send this to the xmlrpc > processor but It seems that hash keys have a max length of 1024. > > So here is a little include file which adds a raw_post method to the > @request object > > listing cgifix.rb: > http://rafb.net/paste/results/nZsui045.html > > P.S: I love open classes. > > -- > Tobi > http://www.hieraki.org - Open source book authoring > http://blog.leetsoft.com - Technical weblog > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >-- "Stil ist die Fähigkeit, komplizierte Dinge einfach zu sagen - nicht umgekehrt." -- Cocteau, Jean
Thanks Jesus.. always a step ahead of me this guy... On Thu, 20 Jan 2005 10:05:20 +0100, Lars Hoss <woeye-ee4meeAH724@public.gmane.org> wrote:> Hi Tobias, > > good to hear that I am not the only one who fiddles about xmlrpc :-) > Altough I had no problems so far with my approach as suggested on my > weblog (http://woeye.highteq.net/blog/details/81), even with larger > images, it''s clearly a better idea to give access to the raw data. > bitsweat added support for raw access as well: > http://dev.rubyonrails.com/ticket/505. So in 0.9.5 it will be possible > to add xmlrpc support without any funny hacks :-) > > Yours, > Lars > > Am 20.01.2005 um 06:18 schrieb Tobias Luetke: > > > I was tinkering with xmlrpc today and as always was stunned by the > > high quality library shipped with ruby. > > > > Problem i ran into was that the ruby CGI lib steals the raw post data > > and tries to make a hash out of it. Its possible to convert the key of > > the first parameter back to a string and send this to the xmlrpc > > processor but It seems that hash keys have a max length of 1024. > > > > So here is a little include file which adds a raw_post method to the > > @request object > > > > listing cgifix.rb: > > http://rafb.net/paste/results/nZsui045.html > > > > P.S: I love open classes. > > > > -- > > Tobi > > http://www.hieraki.org - Open source book authoring > > http://blog.leetsoft.com - Technical weblog > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > "Stil ist die Fähigkeit, komplizierte Dinge einfach zu sagen - nicht > umgekehrt." -- Cocteau, Jean > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi http://www.hieraki.org - Open source book authoring http://blog.leetsoft.com - Technical weblog