[#3861] super — ts <decoux@...>
[#3862] Marshal.dump'ing OpenStruct objects — Mauricio Fern疣dez <batsman.geo@...>
Hi,
[#3881] mkdir, mkdir_p in FileUtils and mode — Florian Frank <flori@...>
Hello,
[#3907] Obtaining mode information on an IO object — Jos Backus <jos@...>
The attached patch implements IO#mode. This method returns the mode the IO
Hi,
On Tue, Dec 07, 2004 at 09:25:13AM +0900, nobu.nokada@softhome.net wrote:
Jos Backus wrote:
Hi,
On Thu, Dec 09, 2004 at 10:47:48AM +0900, nobu.nokada@softhome.net wrote:
On Thu, Dec 09, 2004 at 02:40:33PM +0900, James Britt wrote:
[#3914] Pathname needs a makeover — "Berger, Daniel" <Daniel.Berger@...>
Hi all,
[#3922] Incorrect escaping in strings produced by String::inspect — noreply@...
Bugs item #1173, was opened at 2004-12-08 17:35
[#3966] unknown node type 0 — Andrew Walrond <andrew@...>
I still get this happening a lot with my Rubyx linux ruby script.
This is a long standing bug in Ruby, and has been reported hundreds of times
Hi,
[#3975] Patches to test/unit — Ryan Davis <ryand-ruby@...>
I believe these are the minimal patches needed to make it possible to
[#3982] Win32: rb_sys_fail() - errno == 0 — Florian Gro<florgro@...>
Moin!
[#4000] 1.8.2 preview4 — Yukihiro Matsumoto <matz@...>
Hello,
[#4009] cgi.rb -- more GET/POST stuff — mde@...26.com
First of all, I think it would be great, as Eustaquio suggests, to
GETs and POSTs are defined to be fairly different actions. I'd read
-----BEGIN PGP SIGNED MESSAGE-----
Francis Hwang wrote:
-----BEGIN PGP SIGNED MESSAGE-----
First of all, the entire discussion of when GET is appropriate
mde@state26.com wrote:
[#4027] Allowing custom number literal suffixes? — Florian Gro<florgro@...>
Moin!
Hi,
Mathieu Bouchard wrote:
Mathieu Bouchard wrote:
I'm not sure I would advocate making Ruby's grammar even more
>
Brent Roman wrote:
> Brent Roman wrote:
Brent Roman wrote:
> Florian Gross wrote:
Mathieu Bouchard wrote:
Mathieu Bouchard wrote:
[#4033] Garbage collection trouble — Christian Neukirchen <chneukirchen@...>
Hello,
>>>>> "C" == Christian Neukirchen <chneukirchen@gmail.com> writes:
ts <decoux@moulon.inra.fr> writes:
>>>>> "C" == Christian Neukirchen <chneukirchen@gmail.com> writes:
[#4040] Extensions, Internal — Jgen Mangler <juergen.mangler@...>
Hi,
[PATCH] cgi.rb -- more GET/POST stuff
First of all, I think it would be great, as Eustaquio suggests, to
be able to distinguish between CGI GET and POST vars.
However, having said that, as a Web programmer who started
work mostly with ASP/PHP and now work with Ruby and Perl,
I have to say that the biggest deficiency in cgi.rb is that
using POST method makes variables disappear completely from
the query string of the processing file (i.e., the "action"
property of the Web form).
It is common practice in Web programming to pass non-changing
values (like a session ID) around on the query string in an
automated fashion, even if posting a form (e.g.,
<form method="POST" action="proc.rbx?sessionid=adsfasdf2112">).
In the Web programming languages that a lot of people start out
on, there is one single place to look for all data coming back
to the processing page (PHP's $_REQUEST and ASP's Request).
This is farily intuitive, and only becomes an issue when
you make the bonehead mistake of using two identically named
variables -- and as long as rules of precence are documented
(i.e., GET before POST), it's not usually a big issue, in
my experience.
I have a feeling there will be more and more Web programmers
like me who will be trying out Ruby, and unless there is some
specific reason to make it an exclusive 'either/or' choice,
it might be nice if cgi.rb acted as intuitively for Web
programmers as the rest of Ruby does.
Again, I think Eustaquio has a good idea -- but for me the
biggest issue is that vanishing query string.
bollowing is a patch I've been using for awhile with cgi.rb
languages
to keep query string variables from disappearing when I use a
POST. I'd love to know if there's a better or 'more Rubyish'
way to do it.
Thanks.
Matthew
--- cgi.rb 2004-11-01 17:49:15.000000000 -0600
+++ cgi.rb.new 2004-12-22 22:30:00.000000000 -0600
@@ -1102,24 +1102,28 @@
@multipart = true
@params = read_multipart(boundary, Integer(env_table['CONTENT_LENGTH']))
else
- @multipart = false
- @params = CGI::parse(
- case env_table['REQUEST_METHOD']
- when "GET", "HEAD"
- if defined?(MOD_RUBY)
- Apache::request.args or ""
- else
- env_table['QUERY_STRING'] or ""
- end
- when "POST"
- stdinput.binmode if defined? stdinput.binmode
- stdinput.read(Integer(env_table['CONTENT_LENGTH'])) or ''
- else
- read_from_cmdline
- end
- )
+ allparams = ''
+ case env_table['REQUEST_METHOD']
+ when "GET", "HEAD", "POST"
+ if defined?(MOD_RUBY)
+ allparams += (Apache::request.args or '')
+ else
+ allparams += (env_table['QUERY_STRING'] or '')
+ end
+ if env_table['REQUEST_METHOD'] == 'POST'
+ if not allparams.empty?
+ allparams += '&'
+ end
+ stdinput.binmode if defined? stdinput.binmode
+ allparams += (stdinput.read(Integer(env_table['CONTENT_LENGTH'])) or '')
+ end
+ else
+ allparams = read_from_cmdline
+ end
+ @multipart = false
+ @params = CGI::parse(allparams)
end
-
+
@cookies = CGI::Cookie::parse((env_table['HTTP_COOKIE'] or env_table['COOKIE']))
end
private :initialize_query