Yo fellow mod_perlers.
I've ran across a weird problem.
I'm writing a light replacement to CGI... when the request is a multipart POST I think you're supposed to get the data from the client by calling $r->read($buffer,$size) right? (Where $r is an Apache->request)
The problem is that in the last read when the $size is larger than what is leftover, $r rather than putting the last chunk of data in the $buffer just returns it empty. :-(
Therefore the only way I've gotten the thing to work properly has been to specify a $size of 1 byte. (not exactly efficient but I was just fooling around to get closer to a solution)
Does anyone know what's going wrong?
Shouldn't read behave the way I expect it?
I'm using mod_perl-1.26
Thanks,
Kostis
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.