mod_actions.c revision ca53a74f4012a45cbad48e940eddf27d866981f9
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering/* ====================================================================
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * The Apache Software License, Version 1.1
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * Copyright (c) 2000 The Apache Software Foundation. All rights
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * Redistribution and use in source and binary forms, with or without
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * modification, are permitted provided that the following conditions
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * 1. Redistributions of source code must retain the above copyright
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * notice, this list of conditions and the following disclaimer.
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * 2. Redistributions in binary form must reproduce the above copyright
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * notice, this list of conditions and the following disclaimer in
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * the documentation and/or other materials provided with the
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * distribution.
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * 3. The end-user documentation included with the redistribution,
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * if any, must include the following acknowledgment:
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * "This product includes software developed by the
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * Apache Software Foundation (http://www.apache.org/)."
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * Alternately, this acknowledgment may appear in the software itself,
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * if and wherever such third-party acknowledgments normally appear.
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * 4. The names "Apache" and "Apache Software Foundation" must
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * not be used to endorse or promote products derived from this
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * software without prior written permission. For written
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * permission, please contact apache@apache.org.
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * 5. Products derived from this software may not be called "Apache",
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * nor may "Apache" appear in their name, without prior written
8e54f5d90a6b9dd1ff672fb97ea98de66c49e332Lennart Poettering * permission of the Apache Software Foundation.
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6Lennart Poettering * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8e54f5d90a6b9dd1ff672fb97ea98de66c49e332Lennart Poettering * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
8e54f5d90a6b9dd1ff672fb97ea98de66c49e332Lennart Poettering * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
0c8570287400ba57d3705a2f62dd26039121ea6fLennart Poettering * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
0c8570287400ba57d3705a2f62dd26039121ea6fLennart Poettering * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* mod_actions.c: executes scripts based on MIME type or HTTP method
* by Alexei Kosut; based on mod_cgi.c, mod_mime.c and mod_includes.c,
* HTTP method "PUT". The available method names are defined in httpd.h.
#include "apr_strings.h"
#include "ap_config.h"
#include "httpd.h"
#include "http_config.h"
#include "http_request.h"
#include "http_core.h"
#include "http_protocol.h"
#include "http_main.h"
#include "http_log.h"
#include "util_script.h"
return new;
sizeof(action_dir_config));
for (i = 0; i < METHODS; ++i) {
return new;
return NULL;
int methnum;
return NULL;
{NULL}
const char *script;
for (i = 0; i < METHODS; ++i) {
if (r->args)
return DECLINED;
script = t;
return HTTP_NOT_FOUND;
return DECLINED;
return OK;
static void register_hooks(void)