1
0
mirror of https://github.com/apache/httpd.git synced 2025-09-13 22:01:52 +03:00

269 Commits

Author SHA1 Message Date
Martin Kraemer
1577a9adf6 Let CGI daemon die if the network layer has been shut down (problem noticed on BS2000/OSD)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104080 13f79535-47bb-0310-9956-ffa450edef68
2004-06-29 13:48:20 +00:00
Joe Orton
ef03042845 * modules/generators/mod_cgid.c (cgid_server, set_script_socket):
Remove unused variables.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103209 13f79535-47bb-0310-9956-ffa450edef68
2004-03-30 10:57:30 +00:00
Jeff Trawick
8fcedf0718 mod_cgid: Don't allow Scriptsock to be specified inside VirtualHost;
Don't place script socket inside default server root instead of
actual server root.

The sock name was being stored in the server config, though it
was not specific to a server.

ap_server_root_relative() was being used prior to config processing,
so it was always picking up the default server root.

PR:            27886


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103184 13f79535-47bb-0310-9956-ffa450edef68
2004-03-29 02:56:21 +00:00
Jeff Trawick
18edbaaf56 mod_cgid: Fix storage corruption caused by use of incorrect pool.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102961 13f79535-47bb-0310-9956-ffa450edef68
2004-03-15 20:00:13 +00:00
André Malo
a688f06b19 fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102618 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:31:03 +00:00
André Malo
d0e05bada9 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102565 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 12:07:22 +00:00
André Malo
0d57db3af2 apply Apache License, 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102524 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:19:28 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Jeff Trawick
8dfff0a318 change the way the cgid daemon restart logic determines whether
or not the MPM is still running...   now it works with prefork
MPM too


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102046 13f79535-47bb-0310-9956-ffa450edef68
2003-12-13 19:09:00 +00:00
Cliff Woolley
aaf0424e2b get rid of _FOREACH
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101788 13f79535-47bb-0310-9956-ffa450edef68
2003-11-16 02:09:14 +00:00
Jeff Trawick
c76efd6bfb Fix a long delay with CGI requests and keepalive connections on
AIX.

On AIX, for processes like mod_cgid's script children where
SIGCHLD is ignored, kill(pid,0) returns success for up to
one second after the script child exits, based on when a
daemon runs to clean up unnecessary process table entries.
getpgid() can report the proper info (-1/ESRCH) immediately.

One user had a page with a lot of embedded images created by
CGIs, and the browser fetched them on a keepalive connection,
and the cumulative delays were very noticeable by the clients.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101716 13f79535-47bb-0310-9956-ffa450edef68
2003-11-07 15:26:34 +00:00
Sander Striker
3e4547ab87 Forward port from 2.0:
SECURITY [CAN-2003-0789]: mod_cgid: Resolve some mishandling of
the AF_UNIX socket used to communicate with the cgid daemon and
the CGI script.

Submitted by: Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101570 13f79535-47bb-0310-9956-ffa450edef68
2003-10-26 23:25:44 +00:00
Jeff Trawick
be1143ae61 mod_cgid: fix a hash table corruption problem which could
result in the wrong script being cleaned up at the end of a
request.

Unique storage was not used for the key, as the code assumed
incorrectly that apr_hash_set() made a copy of the key.  Thus,
when the script pid was looked up at the end of the request,
some other script's pid could be found.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101374 13f79535-47bb-0310-9956-ffa450edef68
2003-10-02 11:58:57 +00:00
Jeff Trawick
aa21671e13 switch to APR 1.0 API (which is still in flux)
because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
2.1-dev won't build with apr and apr-util's 0.9 branch anymore


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101154 13f79535-47bb-0310-9956-ffa450edef68
2003-09-03 19:27:12 +00:00
André Malo
b37c094b16 drop superfluous argument from ap_ssi_parse_string.
The new API should now be stable.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101069 13f79535-47bb-0310-9956-ffa450edef68
2003-08-22 23:14:30 +00:00
André Malo
728dc394a9 adjust mod_cgi and mod_cgid
bump MMN for API change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101047 13f79535-47bb-0310-9956-ffa450edef68
2003-08-21 22:12:08 +00:00
André Malo
9f542e55f3 include_cmd doesn't imply the CGI interface. That code seems to be
a c&p accident.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101039 13f79535-47bb-0310-9956-ffa450edef68
2003-08-20 22:47:52 +00:00
Jeff Trawick
ace2765ea7 mod_cgid: Restart the cgid daemon if it crashes.
PR:             19849
Submitted by:   Glenn Nielsen <glenn@apache.org>
Reviewed by:    Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100343 13f79535-47bb-0310-9956-ffa450edef68
2003-06-23 20:17:00 +00:00
Jeff Trawick
6a371fa684 mod_cgid: Eliminate a double-close of a socket. This resolves
various operational problems in a threaded MPM, since on the
second attempt to close the socket, the same descriptor was
often already in use by another thread for another purpose.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100320 13f79535-47bb-0310-9956-ffa450edef68
2003-06-20 22:53:15 +00:00
William A. Rowe Jr
6c2b1c739a Fix a misterminated comment... noted by bpane
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99142 13f79535-47bb-0310-9956-ffa450edef68
2003-03-31 06:12:00 +00:00
William A. Rowe Jr
686f8cf5ae Solve segfaults from unusual error exceptions in cgid. The daemon
has no 'real' request_rec, so we can't use ap_log_rerror() anywhere
  within the cgid_server() code.

  Also, one of the two log messages was echoed to the child, no point
  when the actual request logic should take care of that notification.

Submitted by:	Jeff Trawick
Reviewed by:	Bill Rowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99132 13f79535-47bb-0310-9956-ffa450edef68
2003-03-31 04:44:11 +00:00
Jeff Trawick
b535985b9b mod_cgi, mod_cgid, mod_ext_filter: Log errors when scripts cannot
be started on Unix because of such problems as bad permissions,
bad shebang line, etc.

Some minor points:

If mod_ext_filter debug is enabled, we go ahead and burn cycles
in the parent to try to discover when we won't be able to exec
the script.

The mod_cgid handler wasn't communicating the right log level to the
daemon; that was required to get the child errfn to spit out the
right message, and it may fix an existing problem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98630 13f79535-47bb-0310-9956-ffa450edef68
2003-02-12 18:27:37 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
Jeff Trawick
bd108a8478 Fix the building of cgi command lines when the query string
contains '='.

PR:              13914
Submitted by:	 Ville Skytt� <ville.skytta@iki.fi> (mod_cgi)
                 Jeff Trawick (mod_cgid)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97601 13f79535-47bb-0310-9956-ffa450edef68
2002-11-22 14:45:19 +00:00
Jeff Trawick
f0ab8f426a mod_cgid: Handle environment variables containing newlines.
Communication between handler and daemon used newlines to delimit
environment variables, which threw everything off when an environment
variable contained a newline.

Communication between handler and daemon was extensively reworked.
Environment variables were handled as in the patch submitted by
Piotr Czejkowski.

PR:              14550
Submitted by:	 Piotr Czejkowski <apache@czarny.eu.org>, Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97530 13f79535-47bb-0310-9956-ffa450edef68
2002-11-15 02:49:29 +00:00
Jeff Trawick
658cf25ab4 watch out for the should-not-occur condition where the daemon can't
find the script pid in the hash and returns zero...  if we send
sigterm to pid zero, we knock out ourself

change the cleanup to return any error from cleanup_nonchild_process()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97493 13f79535-47bb-0310-9956-ffa450edef68
2002-11-12 12:23:42 +00:00
Jeff Trawick
2f9e68ef61 mod_cgid: Terminate CGI scripts when the client connection
drops.

This is done by mod_cgid daemon remembering the pid, which is queried
by the handler at the end of the request.  The handler then
knocks out the CGI script (if it is indeed still running).

It would be slightly easier for the daemon to do this, but naughty
scripts which are hard to kill would hold up all new CGI requests
if the daemon stopped its normal processing to kill a script.

PR:		8388


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97489 13f79535-47bb-0310-9956-ffa450edef68
2002-11-11 23:07:29 +00:00
Jeff Trawick
b143c6acc6 add a comment lamenting the lack of a cleanup for the CGI child
process and mentioning some issues related to the problem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97362 13f79535-47bb-0310-9956-ffa450edef68
2002-10-31 09:30:43 +00:00
Jeff Trawick
53f940a84a Fix a problem with streaming script output and mod_cgid. We have
to tell APR that the socket can be treated as a pipe so that the
apr_file_t is initialized properly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97087 13f79535-47bb-0310-9956-ffa450edef68
2002-10-03 18:15:34 +00:00
Bill Stoddard
5d53209f9b Log error message to the client without the path name.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96241 13f79535-47bb-0310-9956-ffa450edef68
2002-07-30 18:18:03 +00:00
William A. Rowe Jr
9f4d3ce860 s/cgi/cgid might be just a little agressive - fix a comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95852 13f79535-47bb-0310-9956-ffa450edef68
2002-06-23 04:03:21 +00:00
William A. Rowe Jr
c959a9ace8 Note the changed meaning of the NULL next_filter argument to the
ap_sub_req_lookup() family, and fix a few oddball cases (those are,
  PATH_TRANSLATED reference issues.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95844 13f79535-47bb-0310-9956-ffa450edef68
2002-06-22 16:32:45 +00:00
Brian Pane
db8d5fe1d7 Pass the brigade even on header_only requests
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95653 13f79535-47bb-0310-9956-ffa450edef68
2002-06-13 19:41:17 +00:00
William A. Rowe Jr
5cf5552b11 Use lowercased macros
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95620 13f79535-47bb-0310-9956-ffa450edef68
2002-06-12 22:27:37 +00:00
William A. Rowe Jr
9db1cc663f Use the new wrapper
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95617 13f79535-47bb-0310-9956-ffa450edef68
2002-06-12 16:56:58 +00:00
Justin Erenkrantz
9cd9ec170f Apply same patch to mod_cgid that was applied to mod_cgi so that it
bypasses the *_client_block calls in favor of using the input filters
and brigades directly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95385 13f79535-47bb-0310-9956-ffa450edef68
2002-05-30 05:42:46 +00:00
Jeff Trawick
4792a8c423 fix a char signed-ness mismatc in the call to apr_table_set()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95306 13f79535-47bb-0310-9956-ffa450edef68
2002-05-27 10:28:17 +00:00
Cliff Woolley
6acb2a7d42 style police take 2
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95295 13f79535-47bb-0310-9956-ffa450edef68
2002-05-26 23:00:19 +00:00
Cliff Woolley
5a25f1fe66 style police
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95294 13f79535-47bb-0310-9956-ffa450edef68
2002-05-26 22:56:45 +00:00
Brian Pane
77a5581e2c Fix for suexec invocation of CGIs under user dirs when using cgid
PR: 7810
Submitted by:	Colm MacCarthaigh <colmmacc@redbrick.dcu.ie>
Reviewed by:	Brian Pane


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95292 13f79535-47bb-0310-9956-ffa450edef68
2002-05-26 22:10:55 +00:00
Jeff Trawick
bc0cf18899 stop using APLOG_NOERRNO in calls to ap_log_[pr]error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95151 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:33:10 +00:00
Cliff Woolley
768d65eeac AcceptPathInfo was totally backwards... it would reject when set to on and
by default and accept when set to off for the default handler, and would
reject only if set to accept for mod_cgi(d) and mod_isapi.

PR: 8234


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94751 13f79535-47bb-0310-9956-ffa450edef68
2002-04-22 08:08:38 +00:00
Bill Stoddard
921846bd03 Failure to fork cgid is a shooting offense.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94743 13f79535-47bb-0310-9956-ffa450edef68
2002-04-22 01:36:49 +00:00
Sander Striker
d14107e925 Remove hardcoded paths from MPMs and move them to a more central
place.  Expand paths in httpd-std.conf in a similar fashion as we do
in our headers.

Submitted by:	Pier Fumagalli <pier@betaversion.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94431 13f79535-47bb-0310-9956-ffa450edef68
2002-04-04 09:15:44 +00:00
Brian Pane
3e479f646f Removed the single-byte header reads from mod_cgid
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94344 13f79535-47bb-0310-9956-ffa450edef68
2002-03-30 23:55:16 +00:00
Cliff Woolley
3e2ce19baf BUCKET FREELISTS
Add an allocator-passing mechanism throughout the bucket brigades API.

From Apache's standpoint, the apr_bucket_alloc_t* used throughout a given
connection is stored in the conn_rec by the create_connection hook.  That
means it's the MPM's job to optimize recycling of apr_bucket_alloc_t's --
the MPM must ensure that no two threads can ever use the same one at the
same time, for instance.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94304 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 08:17:26 +00:00
Jeff Trawick
e410111205 Fix a mod_cgid problem that left daemon processes stranded
in some server restart scenarios.

It relied on getting SIGHUP to die, but it wasn't careful
about establishing the SIGHUP handling it needed so after
apachectl restart, SIGHUP was ignored since the new cgid
daemon process inherited a signal(SIGHUP,SIG_IGN) done by
the MPM during its restart logic.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94116 13f79535-47bb-0310-9956-ffa450edef68
2002-03-22 02:56:56 +00:00
William A. Rowe Jr
5f469e7815 Now-meaningless-commentary.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94071 13f79535-47bb-0310-9956-ffa450edef68
2002-03-21 05:28:48 +00:00
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