Re: memory leaking on POST
Joe Schaefer <[email protected]>
| Newsgroups | gmane.comp.apache.apreq |
|---|---|
| Message-ID | <[email protected]> |
"Philip M. Gollucci" <[email protected]> writes: > Joe Schaefer wrote: > >> Until someone teaches apreq_brigade_fwrite about spool buckets, >> it probably shouldn't be used for upload brigades. Sorry about that. > I was looking at this a while ago -- APR/U have this function. Really? What's it called? > We custom coded our own -- why ? Because I didn't know apr has something like it? In any case, the "mistake" here is that apreq_brigade_fwrite doesn't consume the brigade, but leaves it "intact". I should have made that function consume the brigade instead- my bad. The fix is easy enough- just use apr_file_read instead of apr_bucket_read when dealing with spool buckets. That'd fix the memory problem for this particular use-case. I wrote a patch last night, but I haven't had the opportunity to write any tests for it yet, and probably won't until the weekend comes around. -- Joe Schaefer