1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-10 02:02:49 +03:00
Commit Graph

111 Commits

Author SHA1 Message Date
Daniel Gruno
e3b43089d8 mod_lua: Slight null-check fix on setcookie.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1570156 13f79535-47bb-0310-9956-ffa450edef68
2014-02-20 11:47:47 +00:00
Daniel Gruno
1d91506913 use err_headers_out for setting cookies instead of headers_out, so they persist on non-2xx/3xx statuses (Thanks to Joe Schaefer for this)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1567434 13f79535-47bb-0310-9956-ffa450edef68
2014-02-11 22:51:20 +00:00
Daniel Gruno
5ed3e10473 mod_lua: Upgrade r:setcookie to accept a table of arguments, and add domain, path and HttpOnly to the list of options available for setting. PR 56128
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1567430 13f79535-47bb-0310-9956-ffa450edef68
2014-02-11 22:45:32 +00:00
Eric Covener
92be81f133 mod_lua: Fix r:setcookie() to add, rather than replace,
the Set-Cookie header. PR56105

Submitted By: Kevin J Walters <kjw ms com>, Edward Lu <Chaosed0 gmail com>
Committed By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1567221 13f79535-47bb-0310-9956-ffa450edef68
2014-02-11 16:57:07 +00:00
Daniel Gruno
40c8487150 Fix support for uploading files by using pushlstring instead of pushstring when pushing binary data.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1564727 13f79535-47bb-0310-9956-ffa450edef68
2014-02-05 12:04:14 +00:00
Daniel Gruno
1ae03d3bcc mod_lua: Detect "All" or "None" before putting together a potentially blank (or static) string.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1555063 13f79535-47bb-0310-9956-ffa450edef68
2014-01-03 12:09:04 +00:00
Eric Covener
c3e08f9469 get arpa/inet.h from apr_want.h for htons where applicable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1551968 13f79535-47bb-0310-9956-ffa450edef68
2013-12-18 15:02:43 +00:00
Rainer Jung
dc0ff62b76 mod_lua: Fix compiler warning by using correct
APR_SIZE_T_FMT and APR_OFF_T_FMT format macro
in debug logging.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1544820 13f79535-47bb-0310-9956-ffa450edef68
2013-11-23 15:45:31 +00:00
Jeff Trawick
b374da81a4 apr_file_write_full() simplification (like r1542413 and r1542416)
hopefully I sidestepped the surprising conflation of OK/APR_SUCCESS
in this code


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542493 13f79535-47bb-0310-9956-ffa450edef68
2013-11-16 12:13:39 +00:00
Daniel Gruno
5a2ba0a377 mod_lua: Use a (new) global pool/mutex setup for IVM rather than a per-process pool.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1526906 13f79535-47bb-0310-9956-ffa450edef68
2013-09-27 13:56:53 +00:00
Daniel Gruno
e9ed2c0311 mod_lua: ap_ntoh64 endianess test
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1524321 13f79535-47bb-0310-9956-ffa450edef68
2013-09-18 07:48:22 +00:00
Daniel Gruno
5929a20fe0 mod_lua: Figure out a way to read from SSL connections with WebSockets. Brigades ain't my strong side, so if someone could adjust it a bit, that'd be swell. It _works_, but I'm sure it could be improved upon. Also make r:wsclose() work properly with SSL.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1523432 13f79535-47bb-0310-9956-ffa450edef68
2013-09-15 12:47:50 +00:00
Guenter Knauf
69637dff7d Use APR type; rename var.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1523211 13f79535-47bb-0310-9956-ffa450edef68
2013-09-14 11:05:05 +00:00
Guenter Knauf
7c12fd500b Fixed ap_ntoh64 argument.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1523207 13f79535-47bb-0310-9956-ffa450edef68
2013-09-14 10:55:10 +00:00
Daniel Gruno
731d18dd4c mod_lua: Add rudimentary WebSocket support. This is a WIP (emphasis on the W, I and P) and subject to change as the idea surrounding it evolves into something meaningful. But for now, WebSockets, yay! Please do review this!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1522030 13f79535-47bb-0310-9956-ffa450edef68
2013-09-11 20:50:46 +00:00
Daniel Gruno
478d3dc36e mod_lua: init cookie as NULL.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1520256 13f79535-47bb-0310-9956-ffa450edef68
2013-09-05 08:59:10 +00:00
Daniel Gruno
63c46e2f6b remove an unneeded variable I just added, oops.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1520250 13f79535-47bb-0310-9956-ffa450edef68
2013-09-05 08:24:29 +00:00
Daniel Gruno
a952d5663d mod_lua: Use ap_cookie_read for reading cookie values, since it's already there.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1520248 13f79535-47bb-0310-9956-ffa450edef68
2013-09-05 08:23:05 +00:00
Daniel Gruno
38024c1665 Add r:setcookie(key, val, secure, expires) and r:getcookie(key) to the request_rec table.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1519977 13f79535-47bb-0310-9956-ffa450edef68
2013-09-04 10:47:46 +00:00
Guenter Knauf
3b905a6fb4 Fix some compiler warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1500362 13f79535-47bb-0310-9956-ffa450edef68
2013-07-07 03:12:52 +00:00
Guenter Knauf
35012f8883 Added new r:touch() function.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1495270 13f79535-47bb-0310-9956-ffa450edef68
2013-06-21 01:51:45 +00:00
Guenter Knauf
0a910d8c16 Added new function r.date_parse_rfc() to mod_lua.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1489400 13f79535-47bb-0310-9956-ffa450edef68
2013-06-04 12:12:14 +00:00
Guenter Knauf
98d56029a0 Fixed crash condition when r.module_info() is called
for modules which dont have directives.
Bug found and fix submitted by gsmith, slightly modified by fuankg.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1489199 13f79535-47bb-0310-9956-ffa450edef68
2013-06-03 22:05:07 +00:00
Guenter Knauf
5982f16da7 Added new functions r:mkdir(), r:mkrdir(), r:rmdir() to mod_lua.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1488981 13f79535-47bb-0310-9956-ffa450edef68
2013-06-03 13:02:46 +00:00
Guenter Knauf
5dbd3677fd Added new function r:htpassword() to mod_lua.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1488773 13f79535-47bb-0310-9956-ffa450edef68
2013-06-02 19:31:16 +00:00
Guenter Knauf
069bd372bc Added optional parameter wanted to r:stat().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1488480 13f79535-47bb-0310-9956-ffa450edef68
2013-06-01 07:47:29 +00:00
Guenter Knauf
57c76a11bb cosmetics.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1488115 13f79535-47bb-0310-9956-ffa450edef68
2013-05-31 07:05:03 +00:00
Guenter Knauf
4e7640be1d Remove unneeded exports from mod_lua.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1487956 13f79535-47bb-0310-9956-ffa450edef68
2013-05-30 18:28:24 +00:00
Guenter Knauf
750cf0b5f5 Whoops - one empty line too much.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1486269 13f79535-47bb-0310-9956-ffa450edef68
2013-05-25 01:14:45 +00:00
Guenter Knauf
b5d55cf99d Removed a bunch of empty lines.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1486266 13f79535-47bb-0310-9956-ffa450edef68
2013-05-25 00:59:12 +00:00
Guenter Knauf
3406c33bfb Changed r.sleep(s) to r.usleep(ms).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1486265 13f79535-47bb-0310-9956-ffa450edef68
2013-05-25 00:56:22 +00:00
Guenter Knauf
2acdfd8ff0 Cast uint16 return value to int.
This fixes a crash on Windows when compiled with MSVC9.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1483348 13f79535-47bb-0310-9956-ffa450edef68
2013-05-16 13:18:48 +00:00
Guenter Knauf
530d55cf3b Fixed Lua type.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1483343 13f79535-47bb-0310-9956-ffa450edef68
2013-05-16 13:11:20 +00:00
Guenter Knauf
0b3f100b46 Fixed compiler warning; sorted includes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1483334 13f79535-47bb-0310-9956-ffa450edef68
2013-05-16 13:00:48 +00:00
Guenter Knauf
f14a0017a6 Revert part of r1476482 which disabled fractions of seconds with r.sleep().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1480871 13f79535-47bb-0310-9956-ffa450edef68
2013-05-10 03:37:06 +00:00
Rainer Jung
10423926d0 lua header update part 1: EDOESNOTBUILD.
First include mod_lua which sets LUA_COMPAT_ALL,
then lua.h which uses it.

Needed at least to build with lua 5.2.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1479718 13f79535-47bb-0310-9956-ffa450edef68
2013-05-06 23:23:43 +00:00
Guenter Knauf
804c2032a7 Fixed the base64 functions.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1476785 13f79535-47bb-0310-9956-ffa450edef68
2013-04-28 14:59:46 +00:00
Guenter Knauf
8f652c1b74 Added function to get all entries of a directory.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1476601 13f79535-47bb-0310-9956-ffa450edef68
2013-04-27 15:26:08 +00:00
Guenter Knauf
f231cd4e08 Reduce compiler warnings.
Fixed some types, added casts, or changed to proper function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1476482 13f79535-47bb-0310-9956-ffa450edef68
2013-04-27 03:23:55 +00:00
Guenter Knauf
bda0a282fe Fixed r.started value to return seconds.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1470157 13f79535-47bb-0310-9956-ffa450edef68
2013-04-20 12:32:08 +00:00
Daniel Gruno
98ebff29d7 Use a mutex to control read/write for IVM values, so we can reuse the existing structures without running into race conditions.
This should get rid of the need to have MaxConnectionsPerChild set to > 0.

If a new value is set and is a string, we either use the existing varbuf or grow it accordingly.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1470156 13f79535-47bb-0310-9956-ffa450edef68
2013-04-20 12:26:05 +00:00
Daniel Gruno
35f9ad9165 use ap_varbuf instead of allocating new strings each time we override an old one.
This uses leaks less memory, but it's still not perfect (but it's a start - maybe I need to use a mutex for this, to override the original object without running into race conditions)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1470155 13f79535-47bb-0310-9956-ffa450edef68
2013-04-20 11:20:22 +00:00
Daniel Gruno
9f39d246e8 r.started already exists as a built in variable, so let's not make it a function as well.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1470117 13f79535-47bb-0310-9956-ffa450edef68
2013-04-20 07:18:23 +00:00
Daniel Gruno
5d652f66ec exists_config_define should return a boolean, not a number, or it will always evaluate to true.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1469844 13f79535-47bb-0310-9956-ffa450edef68
2013-04-19 14:28:25 +00:00
Daniel Gruno
a433e37ec8 remove redundant code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1469751 13f79535-47bb-0310-9956-ffa450edef68
2013-04-19 09:04:52 +00:00
Daniel Gruno
8049067196 Remove lua_ap_banner, as it's no longer being used.
Add ivm_get/ivm_set for Inter-VM data transfer. This allows multiple VMs across a process to share data without having to resort to external databases or filesystems. This is a work in progress, and I have yet to work out a proper way of resetting a variable without causing a memory leak (this could be done by allocating a new pool for each object, but I'm trying to see if there's a more efficient way). Comments, ideas etc are most welcome.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1469744 13f79535-47bb-0310-9956-ffa450edef68
2013-04-19 08:46:28 +00:00
Guenter Knauf
b8fc4783c7 Only ask for the stat info we really use.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1467822 13f79535-47bb-0310-9956-ffa450edef68
2013-04-14 20:03:07 +00:00
Guenter Knauf
abc30cfcd9 Return early with an error instead of returning an incomplete match table.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1467721 13f79535-47bb-0310-9956-ffa450edef68
2013-04-14 02:53:36 +00:00
Guenter Knauf
0e18686c12 Whoops, one AP_MAX_REG_MATCH not caught.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1467719 13f79535-47bb-0310-9956-ffa450edef68
2013-04-14 02:50:19 +00:00
Guenter Knauf
97e8153a9c Decouple mod_lua max regex matches from AP_MAX_REG_MATCH.
Bumped the default to 25 matches; this default can be
overwritten with a CLFAGS define.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1467718 13f79535-47bb-0310-9956-ffa450edef68
2013-04-14 02:36:23 +00:00