At 01:13 PM 4/27/2003, Jeff Trawick wrote: >change apr_file_gets() to return APR_SUCCESS if returning any data > >this change will resolve bugs in such callers as mod_cgi and mod_cgid which >did not have logic to find data with no final '\n' at end of file; conceivably >it will make a number of other callers accept data when there is no '\n' > >if somebody really really wants until apr 1.0 to fix this, we can have >apr_file_gets_foo() until then for callers which would rather have apr do the >heavy lifting instead of adding missing logic to deal with the fact that on >normal files (pipes) where there are no I/O errors good data can come even >when rv != APR_SUCCESS
No need to wait. Consider that anyone using apr_file_gets() already expects to have an EOF. The question is if they are prepared to read data. As long as we give them no data I believe the change won't break any applications. So ++1 since this is an easy app bug we can help to alleviate. The only risk is users who might use data+EOF to check for missing \n. This would be a silly side-effect dependency, but it belongs in CHANGES just in case anyone had done so. Bill
