Daniel Gruno
b6899453ab
Add a note on t->r checking, as per Rüdiger's email.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1582881 13f79535-47bb-0310-9956-ffa450edef68
2014-03-28 20:43:15 +00:00
Daniel Gruno
29e243b1fb
mod_lua: Since c->notes is the only place where r will be NULL, we don't need to check a second time, since we'll never meddle with tables named 'notes'
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1582877 13f79535-47bb-0310-9956-ffa450edef68
2014-03-28 20:33:08 +00:00
Daniel Gruno
d38e1b6e83
mod_lua: Redesign the table construction/access mechanism, so we pass on a struct with the request_rec, the table pointer and the table name instead of just the table pointer. This allows us to use the request_rec for logging/editing purposes, as well as inform the user which exact table in the request_rec was modified.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1582858 13f79535-47bb-0310-9956-ffa450edef68
2014-03-28 18:38:41 +00:00
Daniel Gruno
8ae663bc78
mod_lua: Prevent HTTP Response Splitting by not allowing tables in the request_rec to be set with values containing newlines. This is a semi-ugly hack, but it will have to do until we find another way of setting these values.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1582262 13f79535-47bb-0310-9956-ffa450edef68
2014-03-27 11:20:03 +00:00
Daniel Gruno
2514105ae4
mod_lua: escape key/value pairs when setting cookies to prevent header splitting with tainted cookies.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1582253 13f79535-47bb-0310-9956-ffa450edef68
2014-03-27 10:58:35 +00:00
Daniel Gruno
8ad00113ae
mod_lua: Reformat and escape script error output.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1582247 13f79535-47bb-0310-9956-ffa450edef68
2014-03-27 10:44:43 +00:00
Daniel Gruno
266b5a6438
fix message number
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1578882 13f79535-47bb-0310-9956-ffa450edef68
2014-03-18 13:40:03 +00:00
Daniel Gruno
8ae204c9b0
mod_lua: Actually check whether interpreting the base structure of a file works or not, don't just assume it works.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1578870 13f79535-47bb-0310-9956-ffa450edef68
2014-03-18 13:32:36 +00:00
Daniel Gruno
31ad0e2d6b
mod_lua: be a bit more verbose in error logging.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1578825 13f79535-47bb-0310-9956-ffa450edef68
2014-03-18 11:26:04 +00:00
Daniel Gruno
82e4ee75b0
mod_lua: Add a fixups hook that checks if the original request is intended for LuaMapHandler. This fixes a bug where FallbackResource invalidates the LuaMapHandler directive in certain cases by changing the URI before the map handler code executes.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1576981 13f79535-47bb-0310-9956-ffa450edef68
2014-03-12 22:56:44 +00:00
Daniel Gruno
9dcfbbf7d4
this wasn't supposed to be a pointer, thanks Yann!
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572748 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 21:56:59 +00:00
Daniel Gruno
78f93a7569
Remove bad line that snuck into the commit
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572704 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 19:11:54 +00:00
Daniel Gruno
760d584e2b
mod_lua: Only read up to whatever the user defines as max size when using r:parsebody() - if content length is greater, return an error.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572703 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 19:10:55 +00:00
Daniel Gruno
dde9e0effa
Allow mod_lua to supply a database result with named rows instead of only numeric indexes.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1570528 13f79535-47bb-0310-9956-ffa450edef68
2014-02-21 11:10:10 +00:00
Daniel Gruno
c92f2cf0ad
mod_lua: Add r:wspeek for checking if data is available to be read.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1570208 13f79535-47bb-0310-9956-ffa450edef68
2014-02-20 14:46:38 +00:00
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
328ea376e4
mod_lua: Also check for 5.2 headers/libraries, we support both 5.1 and 5.2 nowadays.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1560038 13f79535-47bb-0310-9956-ffa450edef68
2014-01-21 14:59:29 +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
Christophe Jaillet
3f96d9992f
'ap_getword_conf' can not return NULL
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1551010 13f79535-47bb-0310-9956-ffa450edef68
2013-12-15 10:26:12 +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
Gregg Lewis Smith
bd643bdfb6
WebSocket support requires Winsock2
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1529277 13f79535-47bb-0310-9956-ffa450edef68
2013-10-04 20:03:50 +00:00
Daniel Gruno
85e297e619
Axe the README a bit, add fuankg as contributor. This will need a complete rewrite at some point.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527172 13f79535-47bb-0310-9956-ffa450edef68
2013-09-28 11:11:14 +00:00
Eric Covener
a8ad7b0e63
r1526906 followup:
...
error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527063 13f79535-47bb-0310-9956-ffa450edef68
2013-09-27 20:30:47 +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
83ead14410
Fixed mod_lua NetWare build.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1523208 13f79535-47bb-0310-9956-ffa450edef68
2013-09-14 10:55:53 +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
Eric Covener
227ffd6486
mod_lua: If the first yield() of a LuaOutputFilter returns a string, it should
...
be prefixed to the response as documented.
Also, don't put empty heap buckets in the brigade if a yield() is called with
no string.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1519492 13f79535-47bb-0310-9956-ffa450edef68
2013-09-02 18:38:07 +00:00
Eric Covener
8582560883
mod_lua: Remove ETAG, Content-Length, and Content-MD5 when a LuaOutputFilter
...
is configured without mod_filter. [Eric Covener]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1519483 13f79535-47bb-0310-9956-ffa450edef68
2013-09-02 17:45:40 +00:00
Eric Covener
bc12f5ca71
register LuaOutputFilters with AP_FILTER_PROTO_CHANGE|AP_FILTER_PROTO_CHANGE_LENGTH
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1519476 13f79535-47bb-0310-9956-ffa450edef68
2013-09-02 17:06:16 +00:00
Eric Covener
d7aa057282
Return a 500 error instead of DECLINED when LuaHook* script does not
...
return a numeric value.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1519398 13f79535-47bb-0310-9956-ffa450edef68
2013-09-02 11:43:53 +00:00
Eric Covener
20996af3ee
trace4 logging of return codes from LuaHook* functions.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1519329 13f79535-47bb-0310-9956-ffa450edef68
2013-09-02 01:21:39 +00:00
Guenter Knauf
d9ff913363
Removed comment which should never have been committed.
...
(thanks Eric!)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1519285 13f79535-47bb-0310-9956-ffa450edef68
2013-09-01 15:37:41 +00:00
Daniel Gruno
1ad63fbb73
Adding a simple logging hook for mod_lua, which allows users to create their own logs or bypass the generic logging on a per-request basis.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1519277 13f79535-47bb-0310-9956-ffa450edef68
2013-09-01 15:10:32 +00:00
Eric Covener
0b20132add
remove c++ comment
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1519188 13f79535-47bb-0310-9956-ffa450edef68
2013-08-31 16:02:15 +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