mod_alias.c revision 1b21d7b3d97def358b2e923655edeb16613a1c31
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova/* ====================================================================
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * The Apache Software License, Version 1.1
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * Copyright (c) 2000 The Apache Software Foundation. All rights
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * Redistribution and use in source and binary forms, with or without
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * modification, are permitted provided that the following conditions
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * 1. Redistributions of source code must retain the above copyright
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * notice, this list of conditions and the following disclaimer.
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * 2. Redistributions in binary form must reproduce the above copyright
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * notice, this list of conditions and the following disclaimer in
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * the documentation and/or other materials provided with the
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * distribution.
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * 3. The end-user documentation included with the redistribution,
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * if any, must include the following acknowledgment:
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * "This product includes software developed by the
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * Apache Software Foundation (http://www.apache.org/)."
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * Alternately, this acknowledgment may appear in the software itself,
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * if and wherever such third-party acknowledgments normally appear.
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * 4. The names "Apache" and "Apache Software Foundation" must
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * not be used to endorse or promote products derived from this
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * software without prior written permission. For written
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * permission, please contact apache@apache.org.
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * 5. Products derived from this software may not be called "Apache",
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * nor may "Apache" appear in their name, without prior written
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * permission of the Apache Software Foundation.
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * SUCH DAMAGE.
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * ====================================================================
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * This software consists of voluntary contributions made by many
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * individuals on behalf of the Apache Software Foundation. For more
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * information on the Apache Software Foundation, please see
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * Portions of this software are based upon public domain software
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * originally written at the National Center for Supercomputing Applications,
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * University of Illinois, Urbana-Champaign.
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * http_alias.c: Stuff for dealing with directory aliases
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * Original by Rob McCool, rewritten in succession by David Robinson
#include "apr_strings.h"
#include "apr_lib.h"
#define APR_WANT_STRFUNC
#include "apr_want.h"
#include "ap_config.h"
#include "httpd.h"
#include "http_config.h"
#include "http_request.h"
const char *real;
const char *fake;
char *handler;
} alias_entry;
alias_server_conf *a =
alias_dir_conf *a =
alias_server_conf *a =
alias_server_conf *base = (alias_server_conf *) basev, *overrides = (alias_server_conf *) overridesv;
alias_dir_conf *a =
int use_regex)
if (use_regex) {
#ifndef OS2
return NULL;
const char *f = arg2;
f = arg1;
if (use_regex) {
if (r == NULL)
if (!url)
if (url)
return NULL;
const char *arg3)
const char *arg3)
{NULL}
++aliasp;
++urip;
if (p->regexp) {
if (p->real) {
if (doesc) {
char *escurl;
if (found) {
return found;
return NULL;
char *ret;
int status;
return DECLINED;
if (r->args) {
return status;
return OK;
return DECLINED;
char *ret;
int status;
return status;
return DECLINED;