summaryrefslogtreecommitdiffstats
path: root/server/util.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix some Windows build issuesStefan Fritsch2010-11-251-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039204 13f79535-47bb-0310-9956-ffa450edef68
* Another ooops: properly return APR_SUCCESSStefan Fritsch2010-11-061-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032169 13f79535-47bb-0310-9956-ffa450edef68
* Add a generic pool cleanup function that sets a pointer to NULL and useStefan Fritsch2010-11-061-0/+6
| | | | | | | it to replace various pool cleanup functions. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032167 13f79535-47bb-0310-9956-ffa450edef68
* Added header include for getpid() prototype on Win32.Guenter Knauf2010-10-201-0/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1025496 13f79535-47bb-0310-9956-ffa450edef68
* c isn't used after being set (Fortify)Jeff Trawick2010-09-011-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@991515 13f79535-47bb-0310-9956-ffa450edef68
* Pull out "does request have a body" logic to a centralJim Jagielski2010-08-181-0/+24
| | | | | | | | | | | | canon function and use that for the 100-Continue OK check. Should likely also start using this in the various other places we do this "have body" check thruout the codebase... git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@986699 13f79535-47bb-0310-9956-ffa450edef68
* Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to takeStefan Fritsch2010-06-061-0/+2
| | | | | | | advantage of per-module loglevels git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
* Make ap_pregsub(), used by AliasMatch and friends, use the same syntaxStefan Fritsch2010-01-301-4/+2
| | | | | | | | | | | | | for regex backreferences as mod_rewrite and mod_include: Remove the use of '&' as an alias for '$0' and allow to escape any character with a backslash. Document the use of $0. PR: 48351 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@904765 13f79535-47bb-0310-9956-ffa450edef68
* Spelling fix in comment.Daniel Earl Poirier2009-09-291-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@820038 13f79535-47bb-0310-9956-ffa450edef68
* Bring back OS/2 support.Brian Havard2009-08-261-5/+5
| | | | | | | Reverses r758929 with a little bit of conflict resolution. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@807930 13f79535-47bb-0310-9956-ffa450edef68
* remove OS/2 platform supportJeff Trawick2009-03-271-5/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758929 13f79535-47bb-0310-9956-ffa450edef68
* Add support for escaping all non-ascii chars to ap_escape_html, and useNick Kew2008-12-311-2/+8
| | | | | | | | | | it to fix PR#25202: encoding="entity" doesn't work as advertised in mod_include. For backport, this'll need an ABI-preserving version that'll be a minor MMN bump. But if we do that in /trunk/, it'll never change. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@730296 13f79535-47bb-0310-9956-ffa450edef68
* * Change some "apr_palloc / memcpy" to apr_pstrmemdupTakashi Sato2008-12-161-9/+4
| | | | | | | | | PR: 39519 Submitted by: Christophe JAILLET <christophe.jaillet wanadoo.fr> * Remove unnecessary casts git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726884 13f79535-47bb-0310-9956-ffa450edef68
* * Move ap_timeout_parameter_parse from mod_proxy.c to server/util.c and thusRuediger Pluem2008-10-221-0/+68
| | | | | | | make it part of the public API. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@707022 13f79535-47bb-0310-9956-ffa450edef68
* Remove all references to CORE_PRIVATE.Paul Querna2008-04-071-2/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645455 13f79535-47bb-0310-9956-ffa450edef68
* Rename the ap_escape_path_segment_b function as suggested byGraham Leggett2008-04-051-2/+2
| | | | | | | Ruediger Pluem, and make a corresponding minor bump. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645120 13f79535-47bb-0310-9956-ffa450edef68
* mod_session: Add a generic session interface to unify the differentGraham Leggett2008-04-041-2/+11
| | | | | | | attempts at saving persistent sessions across requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@644746 13f79535-47bb-0310-9956-ffa450edef68
* * Revert to old behaviour: Even if we detect a bad character: Formally decodeRuediger Pluem2007-12-251-0/+2
| | | | | | | | string correctly and do not mess up the string. Let the caller decide what it wants to do with the result according to our return code. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@606776 13f79535-47bb-0310-9956-ffa450edef68
* Fix r578332 for backslashing filesystems, as noted by rpluemNick Kew2007-09-221-0/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@578479 13f79535-47bb-0310-9956-ffa450edef68
* * Rationalise the two ap_unescape_url versionsNick Kew2007-09-221-43/+36
| | | | | | | | | | * Fix ap_unescape_url_keep2f to work as documented (keep %2F encoded, bringing it into line with the documentation as well as common sense). * Introduce suggestion of an extension to the API The most relevant open PR is 41798 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@578332 13f79535-47bb-0310-9956-ffa450edef68
* * We need to supply a (char *) to ap_str_tolower not a char.Ruediger Pluem2007-07-201-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@558133 13f79535-47bb-0310-9956-ffa450edef68
* Multiple trivial fixes from Christophe JAILLETNick Kew2007-07-201-4/+3
| | | | | | | | | PR 38699, 39518, 42005, 42006, 42007, 42008, 42009 The patches are all his, and are sufficiently trivial to review at a glance. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@557837 13f79535-47bb-0310-9956-ffa450edef68
* update license header textRoy T. Fielding2006-07-111-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
* Update the copyright year in all .c, .h and .xml filesColm MacCarthaigh2006-04-191-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
* Bring forward the fix for CVE-2005-3352 already on the branches:Joe Orton2005-12-161-0/+6
| | | | | | | | | | | | * modules/mappers/mod_imagemap.c (imap_url): Escape the referer. * server/util.c (ap_escape_html): Escape the " character. Submitted by: mjc Reviewed by: fielding, jorton git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@357161 13f79535-47bb-0310-9956-ffa450edef68
* No functional Change: Removing trailing whitespace. This alsoJim Jagielski2005-11-101-25/+25
| | | | | | | | means that "blank" lines consisting of just spaces or tabs are now really blank lines git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
* Clean up c2x code-path by not double-setting the prefix variable.Justin Erenkrantz2005-09-281-8/+7
| | | | | | | | | | | * server/util.c (c2x): Take a new prefix parameter instead of hard-coding '%' and then conditionally setting 'x' for half of the cases. Reviewed by: nd git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@292111 13f79535-47bb-0310-9956-ffa450edef68
* Add ap_append_pid(); This is performed enough to warrantJim Jagielski2005-08-311-0/+14
| | | | | | | | | a function I think, especially with the fact that the mapping of getpid() to APR_PID_T_FMT isn't consistant in some areas. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265506 13f79535-47bb-0310-9956-ffa450edef68
* Fix trailing backslashes in configuration directives.Paul Querna2005-05-241-2/+5
| | | | | | | | | PR: 34834 Submitted by: Timo Viipuri <viipuri dlc.fi> Reviewed by: Paul Querna git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@178209 13f79535-47bb-0310-9956-ffa450edef68
* Ensure that we always return a FQDN... This is not guaranteed by eitherJim Jagielski2005-04-211-6/+17
| | | | | | | | | | apr_sockaddr_info_get() or apr_getnameinfo(). Also note that under OS X, apr_getnameinfo() always seems to fail (at least on my machines) so if we don't specific ServerName at the global setting, we get a warning. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@164092 13f79535-47bb-0310-9956-ffa450edef68
* APRized ap_get_local_host()Jim Jagielski2005-04-201-41/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@162066 13f79535-47bb-0310-9956-ffa450edef68
* Move the POSIX reg* implementations into the ap_* namespace;Joe Orton2005-02-111-31/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | internalise the ap_reg*<->PCRE wrapper: * configure.in: Add srclib/pcre to the include path. * include/ap_regex.h: Renamed from include/pcreposix.h. Prefix all constants with AP_; prefix all functions and types with ap_. Define AP_DECLARE to nothing if necessary. Remove regcomp error codes. * include/httpd.h: Include ap_regex.h not pcreposix.h. (ap_pregcomp, ap_regexec, ap_regfree): s/regex_t/ap_regex_t/. (ap_regexec, ap_regerror): Prototypes moved to ap_regex.h. * server/util.c (regex_cleanup, ap_pregcomp, ap_pregsub, ap_pregfree): Adjust for ap_ prefixed types. (ap_regexec, ap_regerror): Removed. * server/Makefile.in: Build util_pcre.c. * server/util_pcre.c: Copied from srclib/pcre/pcreposix.c; remove use of PCRE-internals to do error mapping; rename types to add AP_/ap_ prefixes as above. Use APR includes. (ap_regerror): Use apr_snprintf. * srclib/pcre/Makefile.in: Don't build pcreposix.c into libpcre.la. * modules/*: Update to use new type and constant names. PR: 27750 (part one) Submitted by: Andres Salomon <dilinger voxel.net>, Joe Orton git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153384 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.Justin Erenkrantz2005-02-041-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
* veto and revert win64 patch: 64bit changes must percolate from theRoy T. Fielding2004-10-241-26/+19
| | | | | | | | | bottom (APR/system) up -- we can't give the client a 64bit API and then cast it to 32bits internally without introducing security holes on other platforms. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105572 13f79535-47bb-0310-9956-ffa450edef68
* WIN64: API changes to clean up Windows 64bit compile warningsAllan K. Edwards2004-10-221-19/+26
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105545 13f79535-47bb-0310-9956-ffa450edef68
* * server/util.c (ap_resolve_env): Rewrite to avoid buffer overflows.Joe Orton2004-09-151-33/+81
| | | | | | | | Submitted by: Andr�� Malo Reviewed by: jorton, mjc git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105130 13f79535-47bb-0310-9956-ffa450edef68
* handling of encoded non-slashes was borked in theJeff Trawick2004-09-021-6/+2
| | | | | | | | | AllowEncodedSlashes path thanks to FirstBill for pointing that out! git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104937 13f79535-47bb-0310-9956-ffa450edef68
* Fix the handling of URIs containing %2F when AllowEncodedSlashesJeff Trawick2004-09-011-1/+1
| | | | | | | | is enabled. Previously, such urls would still be rejected with 404. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104925 13f79535-47bb-0310-9956-ffa450edef68
* fix name of The Apache Software FoundationAndré Malo2004-02-091-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
* fix copyright dates according to the first check inAndré Malo2004-02-081-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102589 13f79535-47bb-0310-9956-ffa450edef68
* apply Apache License, Version 2.0André Malo2004-02-061-53/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
* update license to 2004.André Malo2004-01-011-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
* SECURITY [CAN-2003-0020]: escape arbitrary data before writing into theAndré Malo2003-11-241-0/+64
| | | | | | | | | errorlog. Reviewed by: Mark J Cox git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101873 13f79535-47bb-0310-9956-ffa450edef68
* switch to APR 1.0 API (which is still in flux)Jeff Trawick2003-09-031-2/+2
| | | | | | | | 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
* axe a special check for EOF+data from apr_file_gets()... apr_file_gets()Jeff Trawick2003-07-281-1/+2
| | | | | | | doesn't return that combination of conditions any more git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100826 13f79535-47bb-0310-9956-ffa450edef68
* Following the previous commit, adjust the actual parameters ofGreg Stein2003-06-171-17/+17
| | | | | | | | | | ap_strcmp_match() and ap_strcasecmp_match() to use 'expected' rather than 'exp' to avoid shadowing the global exp() function. Submitted by: Justin Erenkrantz <justin@erenkrantz.com> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100286 13f79535-47bb-0310-9956-ffa450edef68
* Don't run regex cleanups before execBrian Pane2003-03-311-1/+2
| | | | | | | | Submitted by: Jeff Trawick Reviewed by: Brian Pane git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99133 13f79535-47bb-0310-9956-ffa450edef68
* Minor MMN bump:André Malo2003-03-071-0/+52
| | | | | | | | | | | | Forward port: Escape special characters (especially control characters) in mod_log_config to make a clear distinction between client-supplied strings (with special characters) and server-side strings. This was already introduced in version 1.3.25. Obtained from: Patch in 1.3.25-dev by Martin git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98912 13f79535-47bb-0310-9956-ffa450edef68
* Avoid passing too many characters to getenv. Make sure that only theBradley Nicholes2003-02-121-1/+3
| | | | | | | environment variable string is passed. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98625 13f79535-47bb-0310-9956-ffa450edef68
* finished that boring job:André Malo2003-02-031-1/+1
| | | | | | | | | 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