| Author |  | 
| chrissmith51 
 
 
 Joined: 28 May 2014
 Posts: 7
 
 
 | 
|  Posted: Fri 05 Jun '15 21:03    Post subject: Buffer Apache output filter invocations |   |  
| 
 |  
| Hi, 
 I am writing an Apache Output Filter and I understand that the default behaviour is for the filter to be called as many times as is required to fulfil the request i.e. multiple invocations per request are possible.
 
 I was wondering if there was a way to buffer these invocations into a single bucket brigade which can then be iterated and processed, so that only one invocation per request takes place?
 
 At the moment I am having issues because I need all the HTML content to be processed at once, but it is currently split into chunks across 3 bucket brigades.
 
 Many thanks,
 Chris
 |  | 
| Back to top |  | 
| James Blond Moderator
 
  
 Joined: 19 Jan 2006
 Posts: 7442
 Location: EU, Germany, Next to Hamburg
 
 | 
|  Posted: Mon 08 Jun '15 16:14    Post subject: |   |  
| 
 |  
| The mod_buffer does that. Maybe if you look into its source you may find the solution to your problem. |  | 
| Back to top |  | 
| chrissmith51 
 
 
 Joined: 28 May 2014
 Posts: 7
 
 
 | 
|  Posted: Mon 08 Jun '15 19:24    Post subject: |   |  
| 
 |  
| Sounds good - i'll check it out and let you know  |  | 
| Back to top |  | 
| chrissmith51 
 
 
 Joined: 28 May 2014
 Posts: 7
 
 
 | 
|  Posted: Tue 09 Jun '15 18:46    Post subject: |   |  
| 
 |  
| Hi James, 
 I agree that module is what's needed, but I can't get it to work. The only directive seems to be BufferSize which has no effect
   
 I also cannot find any examples of this being used at all anywhere. Do you have any other suggestions?
 |  | 
| Back to top |  | 
| James Blond Moderator
 
  
 Joined: 19 Jan 2006
 Posts: 7442
 Location: EU, Germany, Next to Hamburg
 
 | 
|  Posted: Wed 10 Jun '15 17:07    Post subject: |   |  
| 
 |  
| Did you add the correct AddOutputFilterByType? |  | 
| Back to top |  | 
| chrissmith51 
 
 
 Joined: 28 May 2014
 Posts: 7
 
 
 | 
|  Posted: Wed 10 Jun '15 21:47    Post subject: |   |  
| 
 |  
| No - but I was using SetOutputFilter which it claims it can use: 
 SetOutputFilter INFLATE;BUFFER;MY_MOD;DEFLATE
 
 Is that right?
 |  | 
| Back to top |  |