Checkout Tools
  • last updated 8 hours ago
Constraints: committers
Constraints: files
Constraints: dates

Changeset 90467 is being indexed.

Fix a storage leak in mod_mime_magic. The strdup() call when processing

a request should have been an ap_pstrdup() call.

  1. … 1 more file in changeset.
Change everything to The Apache Software License 1.1

  1. … 133 more files in changeset.
Change URLs for the HTTP server project to point to

  1. … 135 more files in changeset.
It's already late 2000, and our copyright notices still say "1999".

  1. … 135 more files in changeset.
uncompress and gzip don't like getting only 4k of the file... pass them

the entire file (but we still only read 4k, so they don't get to run

for long).

PR: 4097

Submitted by: Marcin Cieslak <>

  1. … 1 more file in changeset.
``Oh, by the way: the same procedure as last year?

The same procedure as _every_ year, James!''

So, a lot of touched files here, but it's just a tiny harmless patch.

As every year we bump up the year number in our copyright headers.

1. "199x-1998" => "199x-1999"

2. "1998" => "1998-1999"

  1. … 126 more files in changeset.
Correct the error_log mess in a uniform manner. Add ap_log_rerror() which

includes the client ip address in the log message (it takes a request_rec *

instead of a server_rec *).

PR: 2661

  1. … 37 more files in changeset.
Implement 8-bit ctype suggestion #2 modified by Roy's (unsigned char)

suggestion because Iain Brown <> pointed out that my logic

regarding the casting was wrong. This compiles and runs/works on both

Linux and Solaris 2.6. I'm totally willing to back it out if there

are complaints, I just figure this is the best way to get widespread

multiplatform testing.

To test you need to request a URL with character 246 (�), and you should

create a .htaccess in a directory with an AddDescription containing

character 246 as well. (Actually, trying 240 through 255 would be good.)

PR: 800, 2282, 2553 (and others)

  1. … 39 more files in changeset.
Deal with gcc's broken failure to cast char ** to const char **.

  1. … 8 more files in changeset.
My "all content-types must be lowercase" change neglected param=value

pairs... and would downcase the value, which is a case-sensitive thing.

But, to be honest, the code prior to my changes neglected param=value

pairs. Another case where we really should have some core parsing

routines that understand HTTP rather than the hodge-podge we have


PR: 2394

  1. … 5 more files in changeset.

In the interests of some API cleanup:

I converted all occurances of spawn_child to ap_spawn_child_err, and

removed the spawn_child macro (actually moved it to compat.h)

I then changed ap_spawn_child_err to simply ap_spawn_child, and

ap_spawn_child_err_buff to ap_bspawn_child.

These are all cosmetic and should not change functionality, but I think

this will be of assistance to module authors trying to learn by examples we

set in our code (lord help them!).

Approved in concept by dgaudet & rse.

  1. … 11 more files in changeset.

Two things: replaced the use of spawn_child with ap_spawn_child_err_buff

in various modules (to be "safe" under Win32) and modified the agent and

referer logging modules to use ap_open_piped_logs rather than try and do

it on their own.

I'm not sure that uncompress_child in mod_mime_magic is correct; could

someone look at it?

Also, Ralf, mod_rewrite.c needs similar treatment. I was off to do it but

it looked more complex than the other changes, and I'm sure once you see

the changes made here you can understand which mod_rewrite changes to make.

  1. … 5 more files in changeset.

Cleanups for changes to ap_spawn_child call. Removed an inadvertant

space in mod_include. Work still needed in this area:

ap_spawn_child_err_buff needs to be called to set the child_info

structure, rather than just NULL as it is now.

  1. … 5 more files in changeset.

The used renaming configuration:


bind_address ap_bind_address

coredump_dir ap_coredump_dir

daemons_limit ap_daemons_limit

daemons_max_free ap_daemons_max_free

daemons_min_free ap_daemons_min_free

daemons_to_start ap_daemons_to_start

excess_requests_per_child ap_excess_requests_per_child

group_id ap_group_id

listenbacklog ap_listenbacklog

listeners ap_listeners

lock_fname ap_lock_fname

max_requests_per_child ap_max_requests_per_child

pid_fname ap_pid_fname

restart_time ap_restart_time

scoreboard_fname ap_scoreboard_fname

server_argv0 ap_server_argv0

server_confname ap_server_confname

server_post_read_config ap_server_post_read_config

server_pre_read_config ap_server_pre_read_config

server_root ap_server_root

standalone ap_standalone

threads_per_child ap_threads_per_child

user_id ap_user_id

user_name ap_user_name

suexec_enabled ap_suexec_enabled

day_snames ap_day_snames

dummy_mutex ap_dummy_mutex

month_snames ap_month_snames

rfc1413_timeout ap_rfc1413_timeout

scoreboard_image ap_scoreboard_image

MD5Final ap_MD5Final

MD5Init ap_MD5Init

MD5Update ap_MD5Update

add_cgi_vars ap_add_cgi_vars

add_common_vars ap_add_common_vars

add_module ap_add_module

add_named_module ap_add_named_module

add_per_dir_conf ap_add_per_dir_conf

add_per_url_conf ap_add_per_url_conf

allow_options ap_allow_options

allow_overrides ap_allow_overrides

append_arrays ap_append_arrays

array_cat ap_array_cat

auth_name ap_auth_name

auth_type ap_auth_type

basic_http_header ap_basic_http_header

bclose ap_bclose

bcreate ap_bcreate

bfilbuf ap_bfilbuf

bfileno ap_bfileno

bflsbuf ap_bflsbuf

bflush ap_bflush

bgetopt ap_bgetopt

bgets ap_bgets

bhalfduplex ap_bhalfduplex

block_alarms ap_block_alarms

blookc ap_blookc

bnonblock ap_bnonblock

bonerror ap_bonerror

bpushfd ap_bpushfd

bputs ap_bputs

bprintf ap_bprintf

bread ap_bread

bsetflag ap_bsetflag

bsetopt ap_bsetopt

bskiplf ap_bskiplf

bvputs ap_bvputs

bwrite ap_bwrite

bytes_in_free_blocks ap_bytes_in_free_blocks

bytes_in_pool ap_bytes_in_pool

call_exec ap_call_exec

can_exec ap_can_exec

cfg_closefile ap_cfg_closefile

cfg_getc ap_cfg_getc

cfg_getline ap_cfg_getline

chdir_file ap_chdir_file

check_access ap_check_access

check_alarm ap_check_alarm

check_auth ap_check_auth

check_cmd_context ap_check_cmd_context

check_user_id ap_check_user_id

checkmask ap_checkmask

child_exit_modules ap_child_exit_modules

child_init_modules ap_child_init_modules

child_terminate ap_child_terminate

cleanup_for_exec ap_cleanup_for_exec

clear_module_list ap_clear_module_list

clear_pool ap_clear_pool

clear_table ap_clear_table

close_piped_log ap_close_piped_log

construct_server ap_construct_server

construct_url ap_construct_url

copy_array ap_copy_array

copy_array_hdr ap_copy_array_hdr

copy_table ap_copy_table

core_reorder_directories ap_core_reorder_directories

count_dirs ap_count_dirs

create_environment ap_create_environment

create_per_dir_config ap_create_per_dir_config

create_request_config ap_create_request_config

default_port_for_request ap_default_port_for_request

default_port_for_scheme ap_default_port_for_scheme

default_type ap_default_type

destroy_pool ap_destroy_pool

destroy_sub_req ap_destroy_sub_req

die ap_die

discard_request_body ap_discard_request_body

document_root ap_document_root

each_byterange ap_each_byterange

error_log2stderr ap_error_log2stderr

escape_html ap_escape_html

escape_path_segment ap_escape_path_segment

escape_shell_cmd ap_escape_shell_cmd

exists_scoreboard_image ap_exists_scoreboard_image

finalize_request_protocol ap_finalize_request_protocol

finalize_sub_req_protocol ap_finalize_sub_req_protocol

find_command ap_find_command

find_command_in_modules ap_find_command_in_modules

find_last_token ap_find_last_token

find_linked_module ap_find_linked_module

find_module_name ap_find_module_name

find_path_info ap_find_path_info

find_pool ap_find_pool

find_token ap_find_token

find_types ap_find_types

fini_vhost_config ap_fini_vhost_config

fnmatch ap_fnmatch

force_library_loading ap_force_library_loading

get_basic_auth_pw ap_get_basic_auth_pw

get_client_block ap_get_client_block

get_gmtoff ap_get_gmtoff

get_local_host ap_get_local_host

get_module_config ap_get_module_config

get_remote_host ap_get_remote_host

get_remote_logname ap_get_remote_logname

get_server_name ap_get_server_name

get_server_port ap_get_server_port

get_time ap_get_time

get_token ap_get_token

get_virthost_addr ap_get_virthost_addr

getparents ap_getparents

getword ap_getword

getword_conf ap_getword_conf

getword_conf_nc ap_getword_conf_nc

getword_nc ap_getword_nc

getword_nulls ap_getword_nulls

getword_nulls_nc ap_getword_nulls_nc

getword_white ap_getword_white

getword_white_nc ap_getword_white_nc

gm_timestr_822 ap_gm_timestr_822

gname2id ap_gname2id

handle_command ap_handle_command

hard_timeout ap_hard_timeout

header_parse ap_header_parse

ht_time ap_ht_time

ind ap_ind

index_of_response ap_index_of_response

init_alloc ap_init_alloc

init_modules ap_init_modules

init_vhost_config ap_init_vhost_config

init_virtual_host ap_init_virtual_host

internal_redirect ap_internal_redirect

internal_redirect_handler ap_internal_redirect_handler

invoke_handler ap_invoke_handler

is_directory ap_is_directory

is_fnmatch ap_is_fnmatch

is_initial_req ap_is_initial_req

is_matchexp ap_is_matchexp

is_url ap_is_url

keepalive_timeout ap_keepalive_timeout

kill_cleanup ap_kill_cleanup

kill_cleanups_for_fd ap_kill_cleanups_for_fd

kill_cleanups_for_socket ap_kill_cleanups_for_socket

kill_timeout ap_kill_timeout

limit_section ap_limit_section

log_assert ap_log_assert

log_pid ap_log_pid

log_printf ap_log_printf

log_reason ap_log_reason

log_transaction ap_log_transaction

log_unixerr ap_log_unixerr

make_array ap_make_array

make_dirstr ap_make_dirstr

make_dirstr_parent ap_make_dirstr_parent

make_dirstr_prefix ap_make_dirstr_prefix

make_full_path ap_make_full_path

make_sub_pool ap_make_sub_pool

make_table ap_make_table

matches_request_vhost ap_matches_request_vhost

meets_conditions ap_meets_conditions

merge_per_dir_configs ap_merge_per_dir_configs

no2slash ap_no2slash

note_auth_failure ap_note_auth_failure

note_basic_auth_failure ap_note_basic_auth_failure

note_cleanups_for_fd ap_note_cleanups_for_fd

note_cleanups_for_file ap_note_cleanups_for_file

note_cleanups_for_socket ap_note_cleanups_for_socket

note_digest_auth_failure ap_note_digest_auth_failure

note_subprocess ap_note_subprocess

null_cleanup ap_null_cleanup

open_logs ap_open_logs

open_piped_log ap_open_piped_log

overlay_tables ap_overlay_tables

palloc ap_palloc

parseHTTPdate ap_parseHTTPdate

parse_htaccess ap_parse_htaccess

parse_uri ap_parse_uri

parse_uri_components ap_parse_uri_components

parse_hostinfo_components ap_parse_hostinfo_components

parse_vhost_addrs ap_parse_vhost_addrs

pcalloc ap_pcalloc

pcfg_open_custom ap_pcfg_open_custom

pcfg_openfile ap_pcfg_openfile

pclosedir ap_pclosedir

pclosef ap_pclosef

pclosesocket ap_pclosesocket

pduphostent ap_pduphostent

pfclose ap_pfclose

pfdopen ap_pfdopen

pfopen ap_pfopen

pgethostbyname ap_pgethostbyname

pool_is_ancestor ap_pool_is_ancestor

pool_join ap_pool_join

popendir ap_popendir

popenf ap_popenf

pregcomp ap_pregcomp

pregfree ap_pregfree

pregsub ap_pregsub

process_request ap_process_request

process_resource_config ap_process_resource_config

proxy_add_header ap_proxy_add_header

proxy_c2hex ap_proxy_c2hex

proxy_cache_check ap_proxy_cache_check

proxy_cache_error ap_proxy_cache_error

proxy_cache_tidy ap_proxy_cache_tidy

proxy_cache_update ap_proxy_cache_update

proxy_canon_netloc ap_proxy_canon_netloc

proxy_canonenc ap_proxy_canonenc

proxy_connect_handler ap_proxy_connect_handler

proxy_date_canon ap_proxy_date_canon

proxy_del_header ap_proxy_del_header

proxy_doconnect ap_proxy_doconnect

proxy_ftp_canon ap_proxy_ftp_canon

proxy_ftp_handler ap_proxy_ftp_handler

proxy_garbage_coll ap_proxy_garbage_coll

proxy_garbage_init ap_proxy_garbage_init

proxy_get_header ap_proxy_get_header

proxy_hash ap_proxy_hash

proxy_hex2c ap_proxy_hex2c

proxy_hex2sec ap_proxy_hex2sec

proxy_host2addr ap_proxy_host2addr

proxy_http_canon ap_proxy_http_canon

proxy_http_handler ap_proxy_http_handler

proxy_is_domainname ap_proxy_is_domainname

proxy_is_hostname ap_proxy_is_hostname

proxy_is_ipaddr ap_proxy_is_ipaddr

proxy_is_word ap_proxy_is_word

proxy_liststr ap_proxy_liststr

proxy_log_uerror ap_proxy_log_uerror

proxy_read_headers ap_proxy_read_headers

proxy_sec2hex ap_proxy_sec2hex

proxy_send_fb ap_proxy_send_fb

proxy_send_headers ap_proxy_send_headers

proxyerror ap_proxyerror

psignature ap_psignature

psocket ap_psocket

pstrcat ap_pstrcat

pstrdup ap_pstrdup

pstrndup ap_pstrndup

psprintf ap_psprintf

pvsprintf ap_pvsprintf

push_array ap_push_array

rationalize_mtime ap_rationalize_mtime

read_config ap_read_config

read_request ap_read_request

register_cleanup ap_register_cleanup

register_other_child ap_register_other_child

remove_module ap_remove_module

requires ap_requires

reset_timeout ap_reset_timeout

response_code_string ap_response_code_string

rfc1413 ap_rfc1413

rflush ap_rflush

rind ap_rind

rprintf ap_rprintf

rputc ap_rputc

rputs ap_rputs

run_cleanup ap_run_cleanup

run_fixups ap_run_fixups

run_post_read_request ap_run_post_read_request

run_sub_req ap_run_sub_req

rvputs ap_rvputs

rwrite ap_rwrite

satisfies ap_satisfies

scan_script_header_err ap_scan_script_header_err

scan_script_header_err_buff ap_scan_script_header_err_buff

send_error_response ap_send_error_response

send_fb ap_send_fb

send_fb_length ap_send_fb_length

send_fd ap_send_fd

send_fd_length ap_send_fd_length

send_header_field ap_send_header_field

send_http_header ap_send_http_header

send_http_options ap_send_http_options

send_http_trace ap_send_http_trace

send_mmap ap_send_mmap

send_size ap_send_size

server_root_relative ap_server_root_relative

set_byterange ap_set_byterange

set_callback_and_alarm ap_set_callback_and_alarm

set_content_length ap_set_content_length

set_etag ap_set_etag

set_file_slot ap_set_file_slot

set_flag_slot ap_set_flag_slot

set_keepalive ap_set_keepalive

set_last_modified ap_set_last_modified

set_module_config ap_set_module_config

set_name_virtual_host ap_set_name_virtual_host

set_string_slot ap_set_string_slot

set_string_slot_lower ap_set_string_slot_lower

set_sub_req_protocol ap_set_sub_req_protocol

setup_client_block ap_setup_client_block

setup_prelinked_modules ap_setup_prelinked_modules

should_client_block ap_should_client_block

show_directives ap_show_directives

show_modules ap_show_modules

soft_timeout ap_soft_timeout

some_auth_required ap_some_auth_required

spawn_child_err ap_spawn_child_err

spawn_child_err_buff ap_spawn_child_err_buff

srm_command_loop ap_srm_command_loop

start_restart ap_start_restart

start_shutdown ap_start_shutdown

str_tolower ap_str_tolower

strcasecmp_match ap_strcasecmp_match

strcmp_match ap_strcmp_match

sub_req_lookup_file ap_sub_req_lookup_file

sub_req_lookup_uri ap_sub_req_lookup_uri

sync_scoreboard_image ap_sync_scoreboard_image

table_add ap_table_add

table_addn ap_table_addn

table_do ap_table_do

table_get ap_table_get

table_merge ap_table_merge

table_mergen ap_table_mergen

table_set ap_table_set

table_setn ap_table_setn

table_unset ap_table_unset

time_process_request ap_time_process_request

tm2sec ap_tm2sec

translate_name ap_translate_name

uname2id ap_uname2id

unblock_alarms ap_unblock_alarms

unescape_url ap_unescape_url

unparse_uri_components ap_unparse_uri_components

unregister_other_child ap_unregister_other_child

update_child_status ap_update_child_status

update_mtime ap_update_mtime

update_vhost_from_headers ap_update_vhost_from_headers

update_vhost_given_ip ap_update_vhost_given_ip

util_init ap_util_init

util_uri_init ap_util_uri_init

uudecode ap_uudecode

vbprintf ap_vbprintf

apapi_get_server_built ap_get_server_built

apapi_get_server_version ap_get_server_version

aplog_error ap_log_error

log_error ap_log_error_old

os_escape_path ap_escape_path

os_canonical_filename ap_canonical_filename

acquire_mutex ap_acquire_mutex

create_mutex ap_create_mutex

destroy_mutex ap_destroy_mutex

open_mutex ap_open_mutex

release_mutex ap_release_mutex

os_is_path_absolute ap_is_path_absolute

prelinked_modules ap_prelinked_modules

preloaded_modules ap_preloaded_modules

  1. … 108 more files in changeset.
Modify the licence clauses for 1.3 to prohibit derived packages

from claiming to be "Apache" without the AG's permission. (Always

the intent, I believe, but previously not explicit enough.)

Hopefully this will help deter further dilution of the brand.

Reviewed by: Paul Sutton, Ben Laurie, Jim Jagielski, Randy Terbush,

Roy Fielding, Chuck Murcko, Mark Cox, Ralf Engeschall,

Sameer Parekh, Martin Kraemer, Dean Gaudet, Brian Behlendorf

  1. … 124 more files in changeset.
Mark command_rec and handler_rec as const... this is a backwards

compatible change, 3rd party modules shouldn't get any warnings or

anything due to it. But the advantage is that a bunch more data goes

into read-only sections of memory and some systems can take advantage

of that by not duplicating the page across a fork().

  1. … 40 more files in changeset.
As mentioned a month or two ago there were some implicit assumptions that

the values in content_type, handler, content_encoding, ... were lowercase.

I'm not referring to mod_negotiation here -- there were other cases where

strcmp() was being used. But in addition, mod_negotiation could be

convinced to call str_tolower() on r->content_language(s), which could

possibly modify a "read-only" string... which wastes at least one memory

page per child.

Clean all that up by declaring that the content fields in request_rec

(and related fields elsewhere) must be lowercase, and must not be modified

in place. Naturally I chose this because it's more efficient... rather

than going around needlessly pstrdup()ing and strcasecmp()ing everywhere.

There are a few other tweaks in here I couldn't resist, along the lines

of getting rid of unneeded pstrdup()s. Plus a new function


  1. … 15 more files in changeset.
Slight mistake in mod_mime_magic. If you tried to request a 0-length file

it would return DONE all the way back to the core... which would interpret

that to mean "oh no need to send any response".

  1. … 1 more file in changeset.
Report filename when read error occurs.

PR: 1827

Submitted by: "M.D.Parker" <>

Reviewed by: Dean Gaudet

  1. … 1 more file in changeset.
- no need to use stat() since r->finfo is already what we need

- no need to play with atime/mtime crud, the web server doesn't preserve

that info normally anyhow

- deal with r->finfo.st_mode == 0 || !r->filename (i.e. not a disk file)

- don't reference mime_module.type_checker, this should be controlled by

the ordering within Configuration

- work properly with multiple vhosts

- doc update: even prior to this patch, the code was disabled if there

was no MimeMagicFile directive.

  1. … 2 more files in changeset.
Update the copyright year of all the various HEAD files to

include 1998.

Reviewed by: Jim Jagielski, Martin Kraemer

  1. … 97 more files in changeset.
No block devices under OS/2.

Submitted by: Brian Havard

Reviewed by: Dean Gaudet, Jim Jagielski

  1. … 1 more file in changeset.
- fix an off-by-1 on read() which I think I introduced in an

earlier cleanup

- fix case where m->desc[] may be left unterminated

- note some code which is not multithread safe

Reviewed by: Jim Jagielski, Marc Slemko

  1. … 1 more file in changeset.
Add typecast to removing a compiler warning on systems that consider

mode_t and %o different.


Obtained from:

Submitted by:

Reviewed by: Roy T. Fielding, Jim Jagielski, Dirk-Willem van Gulik

Bug Fixes:

- gzip -cdq requires at least 4k of a partial gzipped file, we

were sending it only 1k, and it wouldn't produce any output. But raising

HOWMANY to 4k has implications on the performance of the (lame) ascmagic()

code. So ascmagic() cheats and only looks at 1k (the previous HOWMANY


- use spawn_child() interface to avoid a resource leak (zombie

child); I don't think even worked on WIN32 before, but it might now... I

special case and use spawnvp() on WIN32.

- use pfopen()/popenf() to avoid resource leaks


- no need to test return from palloc since it never returns NULL

- ensure all log messages include the module name

- Some cases were assuming that aplog_error was a never returning

function. Deal gracefully by propagating an error code back

up the call chain.

- remove some useless code in fsmagic() -- we don't use lstat(), we

use stat() so the only possibility where we'll get S_IFLNK is

if it's a broken symlink.

- for various errors just DECLINE rather than cause the phase to abort

early (a lesson we're learning from all the M_PUT changes we've

had recently)

PR: 1205

Obtained from:

Submitted by:

Reviewed by: Jim Jagielski, Martin Kraemer

  1. … 1 more file in changeset.
The indentation was all whacky and there were various bits not in our

coding style. Fix it up. (There's no code changes in this rev.)

Added apache EMail address to all Apache License Headers

  1. … 88 more files in changeset.
Insert APLOG_NOERRNO where appropriate.

Remove needless errstr buffers, can just pass it all to aplog_errno.

Add __attribute__((format(printf,5,6))) to aplog_error so that we get

useful -Wall warnings about bad printf lists to aplog_error.

#define __attribute__(__x) to be nothing on non-__GNUC__ compilers.

Clean up use of TRANS in http_log.[ch].

  1. … 28 more files in changeset.

Okay, enough damage for tonight. If any of this is wrong, someone please

scream. If not, I'll try and do some more tomorrow; I'm just being extra careful.

  1. … 4 more files in changeset.
Convert log_*() to aplog_error().

Wow! This module wins the prize for most calls to error...