At 04:04 PM 2/21/2007 +0000, Joe Orton wrote: >Any caller using apr_file_write() and not checking for partial writes is >broken and will break in cases less obscure than this, >apr_file_write_full() has been in APR forever.
Of course, that's true. That doesn't make it any less likely that people will misuse the API, and since most operating systems will oblige for any file buffer size and perform a full write handling whatever chunking is necessary behind the scenes, they get away with it. At least, until now, when suddenly their code from years ago suddenly breaks writing large chunks out on Windows, because of a patch to APR that truncates all writes on Win32 to 32,000 bytes. I understand your point of view on this, but I don't think it's a good idea make changes to a widely-used library in a way that could break existing users of the library -- even if they're not using it properly. That's just me, and it could be my way of thinking goes completely against APR's policy. Just felt that had to be said :-) The updated version of the patch only enforces chunked writes specifically for console output, and it does it using the existing buffering functionality, so no new code is required, unlike the original patch. Jonathan Gilbert
