1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

224 Commits

Author SHA1 Message Date
Bill Stoddard
d5c24720dc Commit 1 of 2 to:
1. rename ap_rset_content_type to ap_set_content_type
2. reverse the arguments on the call to aligh with ap_set_content_length


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94056 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 17:41:55 +00:00
Jeff Trawick
5f8b426d1d Get nph- CGI scripts working again by avoiding filters that can't
possibly deal with a script that generates the protocol header.

PR:       8902, 8907, 9983


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94052 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 13:57:08 +00:00
Bill Stoddard
470edb9dd8 First commit to introduce accessor function to set r->content_type..
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94027 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 01:58:47 +00:00
William A. Rowe Jr
65a37752ec Eliminate potential ap_server_root_relative segfaults, with the input
of Jeff Trawick's style changes to the first patches.  Doesn't include
  the fixes to ssl [more complex], and we won't trap errors that involve
  ap_serverroot, since we presume that was normalized on the way in.
  Therefore, testing ap_server_root_relative(DEFAULT_FOO) cases
  should never become necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93965 13f79535-47bb-0310-9956-ffa450edef68
2002-03-16 18:26:58 +00:00
Jeff Trawick
2df1a02f72 deal with the rename of kill_after_timeout to APR_KILL_AFTER_TIMEOUT
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93940 13f79535-47bb-0310-9956-ffa450edef68
2002-03-14 22:19:14 +00:00
Roy T. Fielding
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
Justin Erenkrantz
1b1337e4df Fixup DEBUG_CGI code paths to compile and not leak fds.
PR: 9670, 9671
Submitted by:   David MacKenzie <djm@pix.net>
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93474 13f79535-47bb-0310-9956-ffa450edef68
2002-02-18 06:15:38 +00:00
Justin Erenkrantz
4b72cda81a Correctly check script_in variable.
(script_out and script_err are already correct.)
PR: 9669


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93468 13f79535-47bb-0310-9956-ffa450edef68
2002-02-18 03:31:27 +00:00
William A. Rowe Jr
453e7e7c54 Ever tried to extract some value of QUERY_STRING from within SSI?
Now you can :)  Provides $0..$9 results for any regex evaluation,
  and strengthens the expr parser for regex expressions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92676 13f79535-47bb-0310-9956-ffa450edef68
2001-12-31 05:58:59 +00:00
Cliff Woolley
436ecd5553 Related to Brian's commit to fix the XXX comments I'd added a while back.
These lines were broken too, I just hadn't commented them.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92609 13f79535-47bb-0310-9956-ffa450edef68
2001-12-26 17:31:48 +00:00
Brian Pane
5287c6ea9e Fixed calculation of bucket lengths
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92601 13f79535-47bb-0310-9956-ffa450edef68
2001-12-26 08:58:55 +00:00
William A. Rowe Jr
67c3d93b2c Apply the converse of the AcceptPathInfo patch for isapi's/cgi's.
The default behavior remains, accept PATH_INFO, but it may be expressly
  revoked with AcceptPathInfo Off


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92452 13f79535-47bb-0310-9956-ffa450edef68
2001-12-13 17:22:20 +00:00
Ryan Bloom
e674055ddb Fix the cmd command for mod_include. When we are processing
a cmd command, we do not want to use the r->filename to set
the command name.  The command comes from the SSI tag.  To do this,
I added a variable to the function that builds the command line
in mod_cgi.  This allows the include_cmd function to specify
the command line itself.

PR:	8772


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92150 13f79535-47bb-0310-9956-ffa450edef68
2001-11-24 00:17:01 +00:00
Ian Holsman
86b792b21c Modify post_config hook so that it can return a error,
causing the server not to start.
previous method was to call exit(1) which would not fail
gracefully

PR:
Obtained from:
Submitted by:
Reviewed by:	(Idea only Jeff Trawick)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92144 13f79535-47bb-0310-9956-ffa450edef68
2001-11-23 16:35:22 +00:00
Bill Stoddard
e79f552386 Performance: Move the is_included strcmp to after the check to see if the
request is to be served by the cgi handler.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91876 13f79535-47bb-0310-9956-ffa450edef68
2001-11-12 16:32:33 +00:00
Cliff Woolley
d08f8fb019 Port Justin's mod_cgid change to mod_cgi.
mod_cgi wasn't actually broken in the way that mod_cgid was, but
it's still good do have these checks be against APR_SUCCESS rather
than 0 for clarity.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91868 13f79535-47bb-0310-9956-ffa450edef68
2001-11-12 04:34:13 +00:00
Cliff Woolley
468199afcb Remove the returned-length "w" parameter from apr_bucket_heap_create()
and apr_bucket_heap_make().  It was useless, since the length is invariant
from the length passed in and from the resulting bucket's b->length.  This
takes care of a long-standing issue first brought up in February and
discussed on the dev@apr list.  (Issue #2 from the "Bucket API Cleanup
Issues" thread.)

See http://marc.theaimsgroup.com/?l=apr-dev&m=98324983126666&w=2

Reviewed by:    Ryan Bloom (concept)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91866 13f79535-47bb-0310-9956-ffa450edef68
2001-11-12 03:23:12 +00:00
Ian Holsman
eea38d7c2e This patch changes the apr_table_elts macro so that it provides
access to the internals of an apr_table_t via a const pointer
instead of the current non-const pointer.


Submitted by:	Brian Pane <BPane@pacbell.net>
Reviewed by:	Ian Holsman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91860 13f79535-47bb-0310-9956-ffa450edef68
2001-11-11 22:31:04 +00:00
Cliff Woolley
0db50e73c4 Fix constness problem reported by gcc:
mod_cgi.c: In function `include_cmd':
mod_cgi.c:812: warning: passing arg 1 of pointer to function from incompatible
pointer type

Reported by:	Ian's autobuild


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91062 13f79535-47bb-0310-9956-ffa450edef68
2001-09-18 03:33:30 +00:00
William A. Rowe Jr
772d477ee0 Here's the declaration for all to share. Don't expect many to use it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91059 13f79535-47bb-0310-9956-ffa450edef68
2001-09-17 22:12:49 +00:00
William A. Rowe Jr
f495937085 Remove the Win32 script-processing exception from mod_cgi, and
roll build_command_line/build_argv_list into a unified, overrideable
   ap_cgi_build_command optional function.

   Eliminates a ton of Win32 cruft from core.c for registry parsing.
   Win32 (through the default handler, and newest changes to the
   apr_proc_create fn) continues to serve .bat/.exe files.  This is in
   preparation for adding modules/arch/win32/mod_win32 for scripts.

   Please review the mod_cgi.c behavior very carefully.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91058 13f79535-47bb-0310-9956-ffa450edef68
2001-09-17 21:07:36 +00:00
Paul J. Reder
f2e3713193 Moved split_and_pass_pretag_buckets back to being a
macro at Ryans's request. Removed the return from it
by setting and returning a return code instead. Updated
the code to check the return code from teh macro and
do the right thing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90735 13f79535-47bb-0310-9956-ffa450edef68
2001-08-27 20:25:42 +00:00
Jeff Trawick
a1a33b3115 fix what would seem to be a serious problem in
split_and_pass_pretag_buckets(): the retcode is not
specified on one of the paths


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90600 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 00:47:09 +00:00
William A. Rowe Jr
2902f2da92 Optimize out what is a very expensive in-request call to
ap_server_root_relative (and is becoming more expensive).
  Now the call happens in the config phase where it belongs.
  Note someone can hop in and transpose the stat and open
  with an open and getfileinfo if you are a performance hound.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90563 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 18:53:27 +00:00
Paul J. Reder
9067bdbe2b Fix for mod_include. Ryan's patch to check error
codes put a return in the wrong place. Also, the
include handler return code wasn't being checked.
I don't like macros with returns, so I converted
SPLIT_AND_PASS_PRETAG_BUCKETS into a function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90554 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 15:45:49 +00:00
Ryan Bloom
6e932b2870 Fix the new method code. We need to cast 1 to an apr_int64_t or it will
be treated as a 32-bit integer, and it will wrap after being shifted
32 times.
Submitted by:	Cody Sherr <csherr@covalent.net> and
		Ryan Morgan <rmorgan@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90090 13f79535-47bb-0310-9956-ffa450edef68
2001-08-11 04:04:13 +00:00
William A. Rowe Jr
dc55b249e6 We are done with this subrequest (before we even got started...) so
dump it early.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89943 13f79535-47bb-0310-9956-ffa450edef68
2001-08-06 18:41:31 +00:00
William A. Rowe Jr
0fcef8e76d This is not C++, falling out of scope doesn't constitute destruction :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89942 13f79535-47bb-0310-9956-ffa450edef68
2001-08-06 18:38:43 +00:00
William A. Rowe Jr
725bb2c1c6 Multiviews and mod_negotiation will already handle this case, it never
belonged in mod_cgi itself.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89932 13f79535-47bb-0310-9956-ffa450edef68
2001-08-06 04:47:12 +00:00
Bill Stoddard
a685e2a0e8 Be a bit more explicit. If the filetype is not an APR_REG, the fail the request.
This relys on directory_walk having already resolved symboloc links.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89789 13f79535-47bb-0310-9956-ffa450edef68
2001-07-30 16:18:05 +00:00
Bill Stoddard
11f28c3d04 Win32: Get exec cgi tag working. finfo.protection == 0 on Windows from the
apr_stat() call in directory walk (because discovering the permissions on
Windows is ridiculously expensive).  All we really need to know is whether the
file exists.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89788 13f79535-47bb-0310-9956-ffa450edef68
2001-07-30 15:11:40 +00:00
William A. Rowe Jr
48d57962bc Safe casts - we are assured that len_read is positive, but it must be
stored as an int to initially check the ap_get_client_block() result.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89717 13f79535-47bb-0310-9956-ffa450edef68
2001-07-25 22:02:54 +00:00
William A. Rowe Jr
16231360f1 Goodbye ap_send_http_header
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88390 13f79535-47bb-0310-9956-ffa450edef68
2001-02-28 15:24:09 +00:00
Ryan Bloom
740968b2bf Get mod_cgi building again after moving a bunch of code from the HTTP
module to the core.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88345 13f79535-47bb-0310-9956-ffa450edef68
2001-02-26 06:24:44 +00:00
Greg Stein
dd9b08e321 *) Introduce "ap_conf_vector_t" type to assist with legibility and provide
some type safety. (unfortunately, our old "void*" is type-safe with the
   new one, but over time we should be better)

*) Propagate the new type to all appropriate functions.

*) Random cleaning, whitespace, stylistic nits.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88225 13f79535-47bb-0310-9956-ffa450edef68
2001-02-18 02:58:53 +00:00
Roy T. Fielding
381f88d56a Update copyright to 2001
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88184 13f79535-47bb-0310-9956-ffa450edef68
2001-02-16 04:26:53 +00:00
Doug MacEachern
d42ea0426e s/apr_bucket_pipe_creat/apr_bucket_pipe_create/ typo
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88141 13f79535-47bb-0310-9956-ffa450edef68
2001-02-13 20:16:15 +00:00
Greg Stein
5dc34feb12 *) continued header revamping
*) torch some headers (and some libs) from the autoconf stuff


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88061 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 14:04:21 +00:00
Greg Stein
23714288fe *) remove obsolete http_conf_globals.h
*) simplify all this #ifdef'ing: just nuke the unixd.h header. it isn't
   actually needed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88045 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 03:03:18 +00:00
Doug MacEachern
88d3406f9a renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88019 13f79535-47bb-0310-9956-ffa450edef68
2001-02-08 07:45:33 +00:00
Ryan Bloom
0d10444e86 Make sure that mod_include's post_config hook always runs before
mod_cgi(d)'s post_config hook.  Mod_include creates a hash table in the
post_config stage that mod_cgi(d) uses during it's post_config stage, so
it must be done in this order.
Submitted by:	 Brian Havard <brianh@kheldar.apana.org.au>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87992 13f79535-47bb-0310-9956-ffa450edef68
2001-02-06 16:21:14 +00:00
Ryan Bloom
fbfcde1463 Move the logic for creating CGI processes from mod_include to mod_cgi(d).
This removes a good deal of duplicate logic for creating CGI scripts.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87984 13f79535-47bb-0310-9956-ffa450edef68
2001-02-05 22:57:21 +00:00
William A. Rowe Jr
6282d6e364 Eliminate all assumptions that finfo.protection reflects the existance
or absense of a file.  finfo.filetype is defined as 0 if APR_NOFILE,
  or a non-zero value if the file could be apr_stat()'ed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87933 13f79535-47bb-0310-9956-ffa450edef68
2001-01-31 22:45:35 +00:00
William A. Rowe Jr
2f6d08ae45 Another module to cooperate with APR_FINFO_
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87878 13f79535-47bb-0310-9956-ffa450edef68
2001-01-27 23:35:21 +00:00
William A. Rowe Jr
cd1ef027c2 The changes required for the APR_FINFO_wanted argument to
apr_stat/lstat/getfileinfo.  These are -NOT- optimal, they
  are simply the required changes to get the server working.
  The size of the patch is a warning about how we need to
  really look at what we are trying to accomplish with all
  of these stat/lstat calls.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87760 13f79535-47bb-0310-9956-ffa450edef68
2001-01-20 21:42:23 +00:00
William A. Rowe Jr
59bbd68bec The big change. This is part 3 of the apr-util symbols rename, please
see the first commit of srclib/apr-util/include (cvs apr-util/include)
  for the quick glance at symbols changed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87731 13f79535-47bb-0310-9956-ffa450edef68
2001-01-19 07:04:36 +00:00
William A. Rowe Jr
40655f8641 Provide apr_pool_t arg to register_hooks, since anything they do in that
step -must- be done with a pool that will not outlive the cmd pool, from
  which they may have been dynamically loaded.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87697 13f79535-47bb-0310-9956-ffa450edef68
2001-01-17 15:52:12 +00:00
Doug MacEachern
40391fb9f2 adjust remaining modules to use the new handler hook method (Alan Edwards)
bring back the old handler prototype by reusing r->handler (dougm)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87617 13f79535-47bb-0310-9956-ffa450edef68
2001-01-08 23:55:12 +00:00
Ben Laurie
45f620672d Make handlers use hooks.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87604 13f79535-47bb-0310-9956-ffa450edef68
2001-01-07 19:55:59 +00:00
Jeff Trawick
b3ec25393c mod_cgi: Fix some problems where the wrong error value was being traced
(errno instead of apr_status).

mod_cgid: Keep some of the code in synch with the version in mod_cgi.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87576 13f79535-47bb-0310-9956-ffa450edef68
2001-01-03 20:03:48 +00:00