mod_proxy_scgi.c revision 4da61833a1cbbca94094f9653fd970582b97a72e
4ba93280223ceb5de1bcedb196c38252f334521aLennart Poettering/* Licensed to the Apache Software Foundation (ASF) under one or more
4ba93280223ceb5de1bcedb196c38252f334521aLennart Poettering * contributor license agreements. See the NOTICE file distributed with
4ba93280223ceb5de1bcedb196c38252f334521aLennart Poettering * this work for additional information regarding copyright ownership.
4ba93280223ceb5de1bcedb196c38252f334521aLennart Poettering * The ASF licenses this file to You under the Apache License, Version 2.0
4ba93280223ceb5de1bcedb196c38252f334521aLennart Poettering * (the "License"); you may not use this file except in compliance with
4ba93280223ceb5de1bcedb196c38252f334521aLennart Poettering * the License. You may obtain a copy of the License at
4ba93280223ceb5de1bcedb196c38252f334521aLennart Poettering * http://www.apache.org/licenses/LICENSE-2.0
4ba93280223ceb5de1bcedb196c38252f334521aLennart Poettering * Unless required by applicable law or agreed to in writing, software
4ba93280223ceb5de1bcedb196c38252f334521aLennart Poettering * distributed under the License is distributed on an "AS IS" BASIS,
4ba93280223ceb5de1bcedb196c38252f334521aLennart Poettering * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4ba93280223ceb5de1bcedb196c38252f334521aLennart Poettering * See the License for the specific language governing permissions and
4ba93280223ceb5de1bcedb196c38252f334521aLennart Poettering * limitations under the License.
4ba93280223ceb5de1bcedb196c38252f334521aLennart Poettering * Proxy backend module for the SCGI protocol
4ba93280223ceb5de1bcedb196c38252f334521aLennart Poettering * Andr� Malo (nd/perlig.de), August 2007
#include "http_protocol.h"
#include "http_request.h"
#include "util_script.h"
#include "mod_proxy.h"
#include "scgi.h"
const char *sendfile;
const char *internal_redirect;
} scgi_config;
char *buf;
apr_socket_timeout_set(p, 0);
return rv;
if (*len > 0) {
apr_bucket_heap *h;
h = a->data;
return APR_SUCCESS;
APR_BUCKET_INIT(b);
return DECLINED;
if (err) {
return HTTP_BAD_REQUEST;
r->proxyreq);
if (!path) {
return HTTP_BAD_REQUEST;
return OK;
request_rec *r)
while (length > 0) {
return HTTP_SERVICE_UNAVAILABLE;
return OK;
const char *ns_len;
+ sizeof(SCGI_MAGIC)
+ sizeof(SCGI_PROTOCOL_VERSION);
ap_add_cgi_vars(r);
if (ap_should_client_block(r)) {
int status;
while (readlen > 0) {
return HTTP_SERVICE_UNAVAILABLE;
return HTTP_INTERNAL_SERVER_ERROR;
return OK;
apr_bucket *b;
const char *location;
int status;
return status;
if (!location) {
err = 0;
if (location) {
sizeof(*req_conf));
if (err) {
req_conf);
return OK;
if (!location) {
err = 0;
sizeof(*req_conf));
if (err) {
req_conf);
return OK;
return AP_FILTER_ERROR;
return OK;
&proxy_scgi_module))) {
case scgi_internal_redirect:
return OK;
case scgi_sendfile:
r->output_filters);
return *status;
return OK;
return DECLINED;
int status;
char dummy;
return DECLINED;
r->server);
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
if (backend) {
return status;
return conf;
return conf;
const char *arg)
return NULL;
const char *arg)
return NULL;
{NULL}