Thanks to everyone that helped me with this. It works now! -Tess
-----Original Message----- From: Nick Kew [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 29, 2006 4:14 PM To: [email protected] Subject: Re: One character per brigade? On Wed, 29 Nov 2006 16:04:21 -0600 "Tess Flynn" <[EMAIL PROTECTED]> wrote: > > If you're just examining the data but not modifying it, you don't > > want to mess about with new brigades. > > I was pointed in that direction by this post: > http://marc.theaimsgroup.com/?l=apache-modules&m=108029424904988&w=2 > > I was using the new brigade only as a buffer. Your original post didn't make it clear (to me) you had any good reason to buffer the data. > I could have done this > as a memory block within my ctx, but it didn't seem as efficient > given I didn't know how many buckets the request was broken across. > After I reached the end of the input, my plan was to run > apr_brigade_flatten() against the brigade buffer to get the final > string. If you need the complete data as a string, that's right. If you can avoid buffering the data, it's better. > I need to run an XPath against the content of both the > request and the reply, so I can't have an incomplete document. You don't run an XPath on a string; you run it on a DOM tree. Why not feed the incoming data directly into your XML parser rather than buffer a string? See for example mod_transform. > > Take a look at mod_diagnostics, which reports on exactly the data > > you're looking for, and might be a good startingpoint for your > > module. > > Maybe I'm missing the point, but I don't quite see how > mod_diagnostics will help me. It doesn't seem to gather the entire > request or reply, but operates on each bucket individually. That suggestion was for your task as it appeared before you mentioned buffering and XPath. -- Nick Kew Application Development with Apache - the Apache Modules Book http://www.apachetutor.org/
