Re: output filter ordering question: mod_deflate vs mod_headers vs mod_pagespeed
Thanks for the quick reply, Nick. I played around with this idea but couldn't get it to work. My filter now runs at AP_FTYPE_CONTENT_SET + 1, to make sure it runs after mod_headers. I don't know how to try to coax mod_deflate to run after me. I can prevent it from running before me by removing it from the filter-chain in before my main filter-function runs, but when I try to then put it back in the filter chain after my main filter function, it doesn't appear to work. But you are right; this is a hack on a hack and perhaps not worth pursuing further. Is mod_filter a mechanism I could use in Apache 2.2 to accomplish what I need? I found http://httpd.apache.org/docs/2.2/mod/mod_filter.html and it looks promising. I'll give it a try. The tone of your email made it sound like mod_filter is not quite ready, but it's there in my distribution. Can you elaborate on the state of mod_filter? Thanks! -Josh On Thu, May 17, 2012 at 2:30 AM, Nick Kew n...@apache.org wrote: On 17 May 2012, at 04:24, Joshua Marantz wrote: Or is that insane /or dangerous? AP_FTYPE_ values are something of a blunt instrument, not ideal for cases where you care about ordering. Running mod_headers as a filter is a bit of a hack. What you're proposing is kind-of building a hack onto a hack. I'm sure you can make it work (at least in controlled circumstances where you're not competing against other similar fudges) but IMHO you're right to be worried. Having once upon a time written mod_filter to deal with more complex configuration than the original design envisaged, I wonder if your issue might be a hint that we should revisit the API for programmatic configuration, and make your proposal less hackish? -- Nick Kew
Re: output filter ordering question: mod_deflate vs mod_headers vs mod_pagespeed
Hi I gave it a try but need a little help to get further. I added this to my configuration file: FilterDeclare headers CONTENT_SET FilterDeclare pagespeed CONTENT_SET FilterDeclare deflate CONTENT_SET FilterProvider pagespeed MOD_PAGESPEED_OUTPUT_FILTER resp=Content-Type $text/html FilterProvider headers FIXUP_HEADERS_OUT resp=Content-Type $text/html FilterProvider deflate DEFLATE resp=Content-Type $text/html FilterChain headers pagespeed deflate However when I look at the request in an early output-filter I see this: pagespeed: AP_FTYPE_CONTENT_SET(0) deflate: AP_FTYPE_CONTENT_SET(0) fixup_headers_out: AP_FTYPE_CONTENT_SET(0) byterange: AP_FTYPE_PROTOCOL(0) content_length: AP_FTYPE_PROTOCOL(0) http_header: AP_FTYPE_PROTOCOL(0) http_outerror: AP_FTYPE_PROTOCOL(0) log_input_output: AP_FTYPE_NETWORK(-1) core: AP_FTYPE_NETWORK(0) The code that printed this is: void PrintFilterChain(ap_filter_t* filter) { // TODO(jmarantz): debug-check that these are in increasing order. static ap_filter_type types[] = { AP_FTYPE_RESOURCE, AP_FTYPE_CONTENT_SET, AP_FTYPE_PROTOCOL, AP_FTYPE_TRANSCODE, AP_FTYPE_CONNECTION, AP_FTYPE_NETWORK }; static const char* type_names[] = { AP_FTYPE_RESOURCE, AP_FTYPE_CONTENT_SET, AP_FTYPE_PROTOCOL, AP_FTYPE_TRANSCODE, AP_FTYPE_CONNECTION, AP_FTYPE_NETWORK, END }; static ap_filter_type* types_end = types + arraysize(types); for (ap_filter_t* next; filter != NULL; filter = next) { next = filter-next; // Get the symbolic name for the filter's position, relative to the // symbolic constants above. ap_filter_rec_t* frec = filter-frec; ap_filter_type type = frec-ftype; ap_filter_type* pos = std::lower_bound(types, types_end, type); int index = pos - types; int delta = static_castint(type) - static_castint(*pos); fprintf(stdout, %s: %s(%d)\n, frec-name, type_names[index], delta); } fflush(stdout); } Is the filter -next chain not the correct way to look at this data? In any case the evidence from my system-tests suggest that I haven't achieved the ordering I want yet. Is there something else I need to do? On Thu, May 17, 2012 at 9:27 AM, Joshua Marantz jmara...@google.com wrote: Thanks for the quick reply, Nick. I played around with this idea but couldn't get it to work. My filter now runs at AP_FTYPE_CONTENT_SET + 1, to make sure it runs after mod_headers. I don't know how to try to coax mod_deflate to run after me. I can prevent it from running before me by removing it from the filter-chain in before my main filter-function runs, but when I try to then put it back in the filter chain after my main filter function, it doesn't appear to work. But you are right; this is a hack on a hack and perhaps not worth pursuing further. Is mod_filter a mechanism I could use in Apache 2.2 to accomplish what I need? I found http://httpd.apache.org/docs/2.2/mod/mod_filter.html and it looks promising. I'll give it a try. The tone of your email made it sound like mod_filter is not quite ready, but it's there in my distribution. Can you elaborate on the state of mod_filter? Thanks! -Josh On Thu, May 17, 2012 at 2:30 AM, Nick Kew n...@apache.org wrote: On 17 May 2012, at 04:24, Joshua Marantz wrote: Or is that insane /or dangerous? AP_FTYPE_ values are something of a blunt instrument, not ideal for cases where you care about ordering. Running mod_headers as a filter is a bit of a hack. What you're proposing is kind-of building a hack onto a hack. I'm sure you can make it work (at least in controlled circumstances where you're not competing against other similar fudges) but IMHO you're right to be worried. Having once upon a time written mod_filter to deal with more complex configuration than the original design envisaged, I wonder if your issue might be a hint that we should revisit the API for programmatic configuration, and make your proposal less hackish? -- Nick Kew
remove content in Input Filter
I am trying to write an Input Filter that removes specific content from a bucket brigade but failing in getting it to work: apr_bucket_read(aBucket, bucketStr, readLen, APR_BLOCK_READ); startPos = ; apr_bucket_split(aBucket, (size_t)startPos); tmpBucket = APR_BUCKET_NEXT(aBucket); len = ; apr_bucket_split(tmpBucket, (size_t)len); tmpBucket2 = APR_BUCKET_NEXT(tmpBucket); apr_bucket_delete(tmpBucket); What am I missing? Thanks.
Re: svn commit: r1339313 - in /httpd/httpd/trunk/docs/manual/rewrite: access.html.en advanced.html.en avoid.html.en flags.html.en htaccess.html.en index.html.en intro.html.en proxy.html.en remapping.h
On 05/17/2012 07:53 AM, Kaspar Brand wrote: -1, please revert. Before starting to track users on httpd.apache.org with GA, I would expect two things to happen: a discussion/vote on httpd-dev (as was the case for the commentary system) and - provided that the vote passes - having a privacy policy for the HTTP server project in place [1]. Lack of the latter is a blocker even for tiny changes to http://httpd.apache.org/docs/trunk/ right now, which is the primary reason for my veto. My intentions were indeed to have a vote about this, and the small portion of tracking that I rolled out was never intended as more than a small one-day test to see if we could get it set up and working, since there seemed, at the time, to be no objections on doing it. I'm sorry if this seemed rash, and I have reverted it back to what is was before. One has to learn how to walk the line between voting on issues or just doing it, and I completely acknowledge your reasons for the -1 - lesson learned :) Since I still feel that this is something we could benefit from, I will report my message to docs@ below, so the dev@ people can have a look as well: I've been wondering for some time now, how we can improve the site to give the users a better experience and a faster flow from question to answer. In that search, the question of doing a proper facts-based analysis keeps popping up. What I would essentially like is to be able to look at the flow that happens from when a users has a problem till he/she finds a solution in our documentation (or on our IRC channel or mailing list). We should, as documentation writers, have some idea of whether our efforts are fruitful or not, and whether we can improve pages A, B or C to make it easier for users to search for an answer and find it, but without some form of log files or analytics tool, this becomes quite hard, if not impossible. I would therefore like to propose that we implement some form of anonymous analysis snippet on our documentation, so that we can figure out some facts: - What are users generally searching for when they wind up on our pages? - Which flow of content occurs when a user browses through the docs, looking for answers to problem A, B or C? Do they go through the guide as we intended for them to do, or do they pick a different path, and if so, why? - What are people generally reading about? Which pages are the most popular, and which are almost never touched (and does this reflect our own ideas of which pages are the most useful in various scenarios)? I believe that if we had these facts sorted out, we could more easily work towards improving our documentation and help people reach the answers to their questions faster. I'm looking forward to suggestions, comments and critique as always Also, if people know of some good ways to accomplish this, specifically which tools we could use, I'd appreciate some insight into that as well. -- With regards, Daniel.
Re: Status of Windows-work for 2.4.x
On 5/14/2012 6:08 AM, Jim Jagielski wrote: On May 13, 2012, at 11:04 AM, Steffen wrote: No news from here too. Complaints from the Win community are growing. I know that I've pinged MS for help and that we rec'd some offers from MS engineers to assist us. Have we taken advantage of that? Last I saw from MS was this http://mail-archives.apache.org/mod_mbox/httpd-dev/201204.mbox/%3c391f7185eb3c0941a9dc21c4bb06eacb075...@bl2prd0310mb349.namprd03.prod.outlook.com%3E unless replied to off list, I see no reply to Claudio's questions. This is beyond my understanding so I stayed mum.