Checkout Tools
  • last updated 17 mins ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 80514 is being indexed.

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

set_string_slot_lower().

  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" <mdpc@netcom.com>

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.

PR:

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

setting)

- 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

Cleanups:

- 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.
PR:

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...

PR:

Typo!

remove unreachable code

Add the post read-request phase placeholder to the structures

in the standard modules.

PR: 1009

  1. … 33 more files in changeset.
added child_exit hook for modules

PR:

Obtained from:

Submitted by: Doug MacEachern

Reviewed by: Dean Gaudet

  1. … 37 more files in changeset.
Remove header files that are already included by other headers.

This avoids problems on some OSes that can't handle the same header

being included twice.

Reviewed by: Brian Behlendorf, Dean Gaudet

Submitted by:

Obtained from:

fix seg fault if there is an error decompressing

PR: 904

Submitted by: Martin Kraemer <Martin.Kraemer@mch.sni.de>

Reviewed by: Dean Gaudet

  1. … 1 more file in changeset.
Added missing header-parser entry in module structure.

Submitted by: Martin Kraemer

Added child_init method.

  1. … 38 more files in changeset.
Files often compile better when statements are terminated by semicolons.

Reviewed by:

Submitted by:

Obtained from:

Use STD{IN,OUT,ERR}_FILENO as dictated by posix.1.

Submitted by: Stanley Gambarin <stanleyg@cs.bu.edu>

Reviewed by: Dean Gaudet

  1. … 2 more files in changeset.
General mod_mime_magic cleanup.

The fixes include:

- change DEBUG define to MIME_MAGIC_DEBUG to avoid namespace

collisions.

- change fprintf(stderr, ...) into log_printf

- remove '\n's from log_printf calls

- couple of possible buffer overflow cleanups

- minor spelling cleanup

Reviewed by: Ian Kluft, Jim Jagielski

Submitted by:

Obtained from:

-Wall cleanup

  1. … 5 more files in changeset.
Added mod_mime_magic.

Submitted by: Ian Kluft <ikluft@cisco.com>

    • -0
    • +2597
    ./mod_mime_magic.c
  1. … 7 more files in changeset.