Need orientation around bucket brigades, subrequests, etc.

2013-07-19 Thread dorian taylor
Hello,

I am currently prototyping a module that does the equivalent of this
mod_rewrite incantation:

RewriteCond %{REQUEST_URI} !-U
RewriteRule (.*) http://another.host$1 [P,NS]

...in other words, if a resource cannot be found on the local server,
reverse-proxy the request to another.host. This incantation, of
course, won't work as expected, because mod_rewrite evaluates
RewriteCond *after* RewriteRule, hence the need for a custom module.
Moreover, whichever response handler is installed for the URI, even
core, typically has to be run in order to discover whether or not it
returns a 404, so even if that incantation *did* work properly, it
still wouldn't produce the desired effect.

What this means is that the requested resource has to be run
end-to-end in a subrequest, and, in the event of a 404, its output
discarded before the request is handed off to the proxy.

That's all fine. I can do all that. However: a) dealing with request
bodies and b) handling interactions with other parts of the system
(specifically filters), opens up quite the can of worms.

Running the subrequest locally will consume the input brigade. I'm
counteracting that by installing a filter that tucks the input into a
temporary file, and then another filter which replays the input back
into the proxy request, if there is any of either. (Aside: it is worth
noting that the proxy request itself must not be a subrequest, as
mod_proxy_http discards subrequest bodies.)

If, however, the subrequest response is successful, I need to be able
to hang on to the response content and somehow promote it into main
request, so the configured filters will run against it (I have filters
that won't run except for main requests).

What I don't know a lot about is how the I/O brigade system *itself*
works. Am I right in understanding there's only one pair per
connection?

I should also mention this prototype is in mod_perl, which is more or
less irrelevant to the problem, except for the fact that
modperl_response_handler's priority is APR_HOOK_MIDDLE whereas
proxy_handler is APR_HOOK_FIRST. About all that means is the main
logic can't manifest as a response handler because by then the proxy
handler will already have been run. (It's also undesirable to run this
logic in a response handler because that will get in the way of any
other response handler that's been configured.)

A background writeup on why I want this thing to exist is here:
http://doriantaylor.com/the-redesign-dissolved
The code is here:
https://github.com/doriantaylor/p5-apache2-condproxy/blob/master/lib/Apache2/CondProxy.pm

I'd be grateful if anybody could either explain or point me in the
direction of a definitive summary of how request phases, subrequests
and the bucket brigades interact.

Thanks,

--
Dorian Taylor
http://doriantaylor.com/


[CLOSED] Re: [VOTE] Release Apache httpd 2.4.6 as GA

2013-07-19 Thread Jim Jagielski
With more than 3 (binding) +1 votes and no -1s, I call the voting
CLOSED and the release Good To Go.

I will move the artifacts over to release, so that mirrors can
sync up and plan to announce on Monday.

Thx to all testers and voters!

On Jul 15, 2013, at 12:48 PM, Jim Jagielski j...@jagunet.com wrote:

 The pre-release test tarballs for Apache httpd 2.4.6 can be found
 at the usual place:
 
   http://httpd.apache.org/dev/dist/
 
 I'm calling a VOTE on releasing these as Apache httpd 2.4.6 GA.
 NOTE: The -deps tarballs are included here *only* to make life
 easier for the tester. They will not be, and are not, part
 of the official release.
 
 [ ] +1: Good to go
 [ ] +0: meh
 [ ] -1: Danger Will Robinson. And why.
 
 Vote will last the normal 72 hrs.
 



Anyone interested in a patch to mod_fcgid(with pay)

2013-07-19 Thread Pqf 潘庆峰
Hi, guys
   A company need a TCP/IP patch of mod_fcgid or alternative, and will pay 
for it, anyone interested? I really like to take it but I don't have too much 
time...
   Anyone interested please reply to me and I will forward the email address of 
them.


Our company is hosting a website with a lot of users. Each user needs login to 
access our server. We have an in-house FCGI program responsible for 
authenticate user's credentials. The FCGI program is called “Neti”;. Right now 
Neti works fine with Zeus server, however we want to switch to Apache server.

Neti only listens on TCP/IP socket, it assumes both an authorizer role and a 
responder role in the Fast CGI request. Here's the 3 candidate Apache modules 
to interface Neti:

1. Mod_fastcgi: this module has NOT been updated since 2007. It will break 
randomly, (not only with Neti, but with some other FCGIs), so we're not 
planning to pursue it;

2. Mod_proxy_fcgi: this module supports TCP socket, it can connect to Neti, but 
it doesn't support authorizer role. So in the first FCGI request, it forwards 
the request to Neti as a responder instead of an authorizer, Neti cannot simply 
let it through without properly authorizing it first, thus the request fails;

3. Mod_fcgid: this module supports authorizer role while doesn't support TCP 
connection. We cannot confirm its authorizer role since it doesn't even connect 
to Neti due to lack of TCP;

So our choice is between either adding authorizer role to mod_proxy_fcgi or 
adding TCP/IP to mod_fcgid. 

We’re really willing to pay to have this project done, I mean either adding 
proxy to mod_fcgid or adding authorizer to mod_proxy_fcgi. Are you willing to 
work on this with reward or do you know anyone else who’s interested in doing 
so with pay, for example, author of mod_proxy_fcgi? (I cannot find his name)


Ryan