Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 6th, 2012, 05:16 AM
itrub itrub is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Posts: 2 itrub User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 51 sec
Reputation Power: 0
general - Apache filters

Dear colleagues
I need some help in Apache filter programming on C from high-experienced specialists. I am not novice in Apache filters and would be useful for other participants. Does my interest correspond to general direction of this forum?

Reply With Quote
  #2  
Old October 8th, 2012, 02:27 AM
itrub itrub is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Posts: 2 itrub User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 51 sec
Reputation Power: 0
So, I try to describe my problem. I wrote the input filter, and it works. The header of this filter is:
static apr_status_t gate_in_filter( ap_filter_t *f, apr_bucket_brigade *pbbOut, ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes)

It read the input brigade by
ap_get_brigade(f->next,pbbIn,mode,block,readbytes);

then split it into buckets, filter it accordingly with my business logic, form pbbOut-brigade and finish. All was right, while I faced with requests, that consist of several brigades. I solved problem in following way. I wrapped ap_get_brigade by infinite cycle for(; ; ), that breaked, if I found EOS-bucket at brigade or get empty brigade (without buckets). In this cycle I gather all data from all coming brigades, filter it, concatenate in ONE brigade pbbOut, then finish. It works too. But for some large requests number of brigades excceeds some limit, and one resulting brigade for that request becomes the bad solution: my input filter finishes successfully, but Apache further down in "Segmentation fault" and request does not achieve web-server. So, my question is: how I can send out in filter chain gathered data by MULTIPLE BRIGADES, not the only pbbOut? Does the Apache development technique allow that? Or I have to rebuild in some way my input filter? Could anybody give me qualified advice? Thanks in advance.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > general - Apache filters

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap