ajp_header.c revision 01d82bc3ace026e822ea51e680977c6d3e6f7629
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd/* Licensed to the Apache Software Foundation (ASF) under one or more
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd * contributor license agreements. See the NOTICE file distributed with
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd * this work for additional information regarding copyright ownership.
15b0d99a66145e797cbe368bff5e44d5653be5e5nd * The ASF licenses this file to You under the Apache License, Version 2.0
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * (the "License"); you may not use this file except in compliance with
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * the License. You may obtain a copy of the License at
031b91a62d25106ae69d4693475c79618dd5e884fielding * Unless required by applicable law or agreed to in writing, software
031b91a62d25106ae69d4693475c79618dd5e884fielding * distributed under the License is distributed on an "AS IS" BASIS,
031b91a62d25106ae69d4693475c79618dd5e884fielding * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * See the License for the specific language governing permissions and
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * limitations under the License.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdndstatic const char *response_trans_headers[] = {
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd "Content-Type",
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd "Content-Language",
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd "Content-Length",
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd "Last-Modified",
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd "Location",
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd "Set-Cookie",
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd "Set-Cookie2",
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd "Servlet-Engine",
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd "WWW-Authenticate"
5718d2b6ea423b4eb2d45f64bbc4c8eb61e0400fnd const char *p = header_name;
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd int i = 0;
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd /* ACCEPT-LANGUAGE is the longest header
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd * that is of interest.
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd while (*p)
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd switch (header[0]) {
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd /* NOTREACHED */
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd/* Apache method number to SC methods transform table */
4ef32fc8ca017f80aa0d8ff267722a335c9d7784ndstatic const unsigned char sc_for_req_method_table[] = {
5718d2b6ea423b4eb2d45f64bbc4c8eb61e0400fnd 0, /* M_DELETE */
4ef32fc8ca017f80aa0d8ff267722a335c9d7784nd 0, /* M_PATCH */
return UNKNOWN_METHOD;
else if (r->header_only) {
return SC_M_HEAD;
request_rec *r,
int method;
char *remote_host;
r->method);
return AJP_EBAD_METHOD;
return APR_EGENERAL;
for (i = 0 ; i < num_headers ; i++) {
int sc;
return AJP_EOVERFLOW;
return AJP_EOVERFLOW;
return AJP_EOVERFLOW;
if (r->user) {
return AJP_EOVERFLOW;
if (r->ap_auth_type) {
return AJP_EOVERFLOW;
return AJP_EOVERFLOW;
return AJP_EOVERFLOW;
if (is_ssl) {
&& envvar[0]) {
return AJP_EOVERFLOW;
&& envvar[0]) {
return AJP_EOVERFLOW;
&& envvar[0]) {
return AJP_EOVERFLOW;
&& envvar[0]) {
return APR_EGENERAL;
return AJP_EOVERFLOW;
return AJP_EOVERFLOW;
return APR_SUCCESS;
request_rec *r,
const char *ptr;
return rc;
num_headers = 0;
for(i = 0 ; i < (int) num_headers ; i++) {
const char *stringname;
const char *value;
return rc;
name);
return AJP_EBAD_HEADER;
name = 0;
return rc;
return rc;
return APR_SUCCESS;
request_rec *r,
return rc;
return rc;
return rc;
return APR_SUCCESS;
request_rec *r,
if (*msg) {
return rc;
return rc;
return rc;
return APR_SUCCESS;
return (int) result;
return rc;
return AJP_EBAD_HEADER;
return rc;
return AJP_EBAD_HEADER;
return rc;
return AJP_EBAD_HEADER;
return APR_SUCCESS;
return rc;
return APR_SUCCESS;