Re: Apache::Request.gets is private?
Curt Sampson <[email protected]> Wed, 1 Jun 2005 11:17:43 +0900 (JST)
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 1 Jun 2005, Curt Sampson wrote:
> According to the documentation at
>
> http://modruby.net/en/index.rbx/mod_ruby/classes.html
>
> there's a 'gets' method on an Apache::Request object that, when invoked with
> nil, will return the entire body of the request. However, trying an
> Apache.request.gets(nil) on a POST request throws:
>
> NoMethodError: private method `gets' called for #<Apache::Request:0x82c73f0>
So, basically the documentation is wrong, and that gets should not
be there, and one should use read(num_bytes) instead (passing no arg
to read the entire body), and one should do this before invoking
Request.param (or probably any libapreq function, or any that would
likely invoke Request.parse).
Personally, what I would like to see is:
1. The API documentation split into separate pages for each class,
and the libapreq Apache::Request stuff split out again on to a page
of its own.
2. Explanations added of just how libapreq works. I've spent hours
figuring this out because even the original libapreq documentation
doesn't seem to explain it.
3. General cleaning up of function descriptions, such as getting rid
of non-existent functions (gets), mentioning which ones will invoke
parse(), etc.
I'd be willing to do this, if someone's willing to commit my patches.
I read enough Japanese to be able to do the reorganization myself, but
I'd also need someone to translate the new stuff I write in English into
Japanese.
cjs
--
Curt Sampson <[email protected]> +81 90 7737 2974 http://www.NetBSD.org
Make up enjoying your city life...produced by BIC CAMERA