prosody.git
12 years agomod_component: Remove unused variable
Matthew Wild [Sat, 28 Apr 2012 02:13:59 +0000 (03:13 +0100)]
mod_component: Remove unused variable

12 years agomod_s2s/s2sout.lib: Fix imports and some undefined variables
Matthew Wild [Sat, 28 Apr 2012 02:11:45 +0000 (03:11 +0100)]
mod_s2s/s2sout.lib: Fix imports and some undefined variables

12 years agomod_s2s: Fix imports and remove some unused variables
Matthew Wild [Sat, 28 Apr 2012 02:06:14 +0000 (03:06 +0100)]
mod_s2s: Fix imports and remove some unused variables

12 years agomod_saslauth: Remove unused declaration of xmlns_stanzas
Matthew Wild [Sat, 28 Apr 2012 02:05:35 +0000 (03:05 +0100)]
mod_saslauth: Remove unused declaration of xmlns_stanzas

12 years agomod_c2s: Remove unused import of portmanager
Matthew Wild [Sat, 28 Apr 2012 02:05:03 +0000 (03:05 +0100)]
mod_c2s: Remove unused import of portmanager

12 years agomod_s2s: Add log() import
Matthew Wild [Sat, 28 Apr 2012 01:56:10 +0000 (02:56 +0100)]
mod_s2s: Add log() import

12 years agoutil.timer: Remove unused function imports
Matthew Wild [Sat, 28 Apr 2012 01:41:53 +0000 (02:41 +0100)]
util.timer: Remove unused function imports

12 years agomoduleapi: Import util.timer
Matthew Wild [Sat, 28 Apr 2012 01:40:36 +0000 (02:40 +0100)]
moduleapi: Import util.timer

12 years agoutil.stanza: Remove unused function imports
Matthew Wild [Sat, 28 Apr 2012 01:38:56 +0000 (02:38 +0100)]
util.stanza: Remove unused function imports

12 years agohostmanager: Remove import of unused setmetatable
Matthew Wild [Sat, 28 Apr 2012 01:25:54 +0000 (02:25 +0100)]
hostmanager: Remove import of unused setmetatable

12 years agomoduleapi: Remove unused variable 'module_items'
Matthew Wild [Sat, 28 Apr 2012 01:24:41 +0000 (02:24 +0100)]
moduleapi: Remove unused variable 'module_items'

12 years agomodulemanager: Remove unused function imports
Matthew Wild [Sat, 28 Apr 2012 01:22:42 +0000 (02:22 +0100)]
modulemanager: Remove unused function imports

12 years agomodulemanager: Remove unused NULL declaration
Matthew Wild [Sat, 28 Apr 2012 01:18:17 +0000 (02:18 +0100)]
modulemanager: Remove unused NULL declaration

12 years agoportmanager: Fix breakage (import ALL the functions)
Matthew Wild [Sat, 28 Apr 2012 00:44:08 +0000 (01:44 +0100)]
portmanager: Fix breakage (import ALL the functions)

12 years agoportmanager: Rename activate_service() to activate() (to match deactivate())
Matthew Wild [Sat, 28 Apr 2012 00:27:46 +0000 (01:27 +0100)]
portmanager: Rename activate_service() to activate() (to match deactivate())

12 years agoportmanager: Add module() definition
Matthew Wild [Sat, 28 Apr 2012 00:27:15 +0000 (01:27 +0100)]
portmanager: Add module() definition

12 years agoportmanager: Explicitly import some libraries
Matthew Wild [Sat, 28 Apr 2012 00:27:02 +0000 (01:27 +0100)]
portmanager: Explicitly import some libraries

12 years agonet.http.server: Try default_host if client sent no host anywhere, otherwise... fail...
Matthew Wild [Sat, 28 Apr 2012 00:13:49 +0000 (01:13 +0100)]
net.http.server: Try default_host if client sent no host anywhere, otherwise... fail. It's 2012.

12 years agonet.http.server: Fix traceback on missing host header (thanks darkrain)
Matthew Wild [Fri, 27 Apr 2012 23:51:36 +0000 (00:51 +0100)]
net.http.server: Fix traceback on missing host header (thanks darkrain)

12 years agomod_bosh: Remove unused import of net.httpserver
Matthew Wild [Fri, 27 Apr 2012 23:45:33 +0000 (00:45 +0100)]
mod_bosh: Remove unused import of net.httpserver

12 years agomod_http_errors: Add two new config options, http_errors_always_show (show even for...
Matthew Wild [Fri, 27 Apr 2012 22:12:30 +0000 (23:12 +0100)]
mod_http_errors: Add two new config options, http_errors_always_show (show even for unknown errors) and http_errors_default_message (message for unknown errors)

12 years agonet.http.server, mod_http: Support http_default_host config option to specify where...
Matthew Wild [Fri, 27 Apr 2012 22:11:23 +0000 (23:11 +0100)]
net.http.server, mod_http: Support http_default_host config option to specify where to direct requests for unknown HTTP vhosts

12 years agonet.http.server: Improve comment
Matthew Wild [Fri, 27 Apr 2012 21:37:56 +0000 (22:37 +0100)]
net.http.server: Improve comment

12 years agomod_component: Return true after denying a second component connection for a host...
Matthew Wild [Fri, 27 Apr 2012 21:37:24 +0000 (22:37 +0100)]
mod_component: Return true after denying a second component connection for a host (thanks xnyhps)

12 years agomodulemanager: Clear modulemap when a host is deactivated (thanks xnyhps)
Matthew Wild [Fri, 27 Apr 2012 21:36:35 +0000 (22:36 +0100)]
modulemanager: Clear modulemap when a host is deactivated (thanks xnyhps)

12 years agohostmanager: Remove unused host_config parameter from host-activated event
Matthew Wild [Fri, 27 Apr 2012 21:33:38 +0000 (22:33 +0100)]
hostmanager: Remove unused host_config parameter from host-activated event

12 years agohostmanager: Add some TODO comments
Matthew Wild [Fri, 27 Apr 2012 21:32:04 +0000 (22:32 +0100)]
hostmanager: Add some TODO comments

12 years agohostmanager: Convert host-deactivating event parameters to a table
Matthew Wild [Fri, 27 Apr 2012 21:31:53 +0000 (22:31 +0100)]
hostmanager: Convert host-deactivating event parameters to a table

12 years agomod_proxy65: Fix traceback when proxy65 service fails to bind a port
Matthew Wild [Fri, 27 Apr 2012 21:18:20 +0000 (22:18 +0100)]
mod_proxy65: Fix traceback when proxy65 service fails to bind a port

12 years agomodulemanager: Set module.environment before calling add_host, otherwise the module...
Matthew Wild [Fri, 27 Apr 2012 20:37:45 +0000 (21:37 +0100)]
modulemanager: Set module.environment before calling add_host, otherwise the module will get the parent's environment (thanks xnyhps and Maranda)

12 years agonet.http.server: Remove unused variable
Matthew Wild [Fri, 27 Apr 2012 19:01:21 +0000 (20:01 +0100)]
net.http.server: Remove unused variable

12 years agonet.http.server: Correctly cache results of handler indexing, and also cache failures
Matthew Wild [Fri, 27 Apr 2012 19:00:06 +0000 (20:00 +0100)]
net.http.server: Correctly cache results of handler indexing, and also cache failures

12 years agomod_bosh: Add routes without trailing-'/', so that both /http-bind and /http-bind...
Matthew Wild [Fri, 27 Apr 2012 18:05:03 +0000 (19:05 +0100)]
mod_bosh: Add routes without trailing-'/', so that both /http-bind and /http-bind/ work again

12 years agomod_http: Allow a route value to be static data rather than a handler function
Matthew Wild [Fri, 27 Apr 2012 18:02:36 +0000 (19:02 +0100)]
mod_http: Allow a route value to be static data rather than a handler function

12 years agonet.http.codes: Add missing 418 status code
Matthew Wild [Fri, 27 Apr 2012 17:54:51 +0000 (18:54 +0100)]
net.http.codes: Add missing 418 status code

12 years agomod_http_files: Specify method in HTTP route
Matthew Wild [Fri, 27 Apr 2012 17:40:44 +0000 (18:40 +0100)]
mod_http_files: Specify method in HTTP route

12 years agomod_http: Routes now require a method to be specified, but the path has become option...
Matthew Wild [Fri, 27 Apr 2012 17:37:40 +0000 (18:37 +0100)]
mod_http: Routes now require a method to be specified, but the path has become optional (defaults to the base path with no trailing '/'

12 years agomod_http: Link to docs on routes in error message
Matthew Wild [Fri, 27 Apr 2012 17:36:27 +0000 (18:36 +0100)]
mod_http: Link to docs on routes in error message

12 years agomoduleapi: Rename module:hook_stanza() -> module:hook_tag() (hook_stanza works for...
Matthew Wild [Fri, 27 Apr 2012 17:35:33 +0000 (18:35 +0100)]
moduleapi: Rename module:hook_stanza() -> module:hook_tag() (hook_stanza works for compat)

12 years agomoduleapi: get_host_type(): Return nil for global modules (no host)
Matthew Wild [Fri, 27 Apr 2012 17:34:40 +0000 (18:34 +0100)]
moduleapi: get_host_type(): Return nil for global modules (no host)

12 years agomod_http: Remove unused import of url.parse
Matthew Wild [Thu, 26 Apr 2012 15:53:32 +0000 (16:53 +0100)]
mod_http: Remove unused import of url.parse

12 years agomod_http_files, net.http.parser: Move path normalization to net.http.parser so that...
Matthew Wild [Thu, 26 Apr 2012 15:48:16 +0000 (16:48 +0100)]
mod_http_files, net.http.parser: Move path normalization to net.http.parser so that all modules can benefit

12 years agoMerge with backout
Matthew Wild [Thu, 26 Apr 2012 15:25:17 +0000 (16:25 +0100)]
Merge with backout

12 years agoRevert 98bfebb38705, moved to net.http.parser in 4fc99f1b7570
Matthew Wild [Thu, 26 Apr 2012 15:25:11 +0000 (16:25 +0100)]
Revert 98bfebb38705, moved to net.http.parser in 4fc99f1b7570

12 years agonet.http.server: Fire http-error 400 if request fails sanity checks
Matthew Wild [Thu, 26 Apr 2012 15:11:08 +0000 (16:11 +0100)]
net.http.server: Fire http-error 400 if request fails sanity checks

12 years agonet.http.parser: Handle full URLs in status line.
Waqas Hussain [Thu, 26 Apr 2012 15:07:13 +0000 (20:07 +0500)]
net.http.parser: Handle full URLs in status line.

12 years agomod_http_errors: Module to handle HTTP errors with a HTML page
Matthew Wild [Thu, 26 Apr 2012 14:16:29 +0000 (15:16 +0100)]
mod_http_errors: Module to handle HTTP errors with a HTML page

12 years agonet.http.server: Make error handling overrideable via 'http-error' event
Matthew Wild [Thu, 26 Apr 2012 14:14:19 +0000 (15:14 +0100)]
net.http.server: Make error handling overrideable via 'http-error' event

12 years agonet.server.http: Parse absolute URIs in requests (thanks Maranda)
Matthew Wild [Thu, 26 Apr 2012 14:05:05 +0000 (15:05 +0100)]
net.server.http: Parse absolute URIs in requests (thanks Maranda)

12 years agomoduleapi: Fix parameters to unhook_object_event()
Matthew Wild [Thu, 26 Apr 2012 13:51:55 +0000 (14:51 +0100)]
moduleapi: Fix parameters to unhook_object_event()

12 years agomoduleapi: module:depends(): Don't load shared modules onto the current host if the...
Matthew Wild [Thu, 26 Apr 2012 06:04:59 +0000 (07:04 +0100)]
moduleapi: module:depends(): Don't load shared modules onto the current host if the current host is '*'...

12 years agonet.http.server: Expose events object (for debug purposes)
Matthew Wild [Thu, 26 Apr 2012 05:58:57 +0000 (06:58 +0100)]
net.http.server: Expose events object (for debug purposes)

12 years agoutil.helpers: show_events(): Make more robust, and allow filtering results to a speci...
Matthew Wild [Thu, 26 Apr 2012 05:58:21 +0000 (06:58 +0100)]
util.helpers: show_events(): Make more robust, and allow filtering results to a specific event

12 years agonet.http.server: Lower score of wildcard handlers to ensure specific handlers beat...
Matthew Wild [Thu, 26 Apr 2012 05:47:17 +0000 (06:47 +0100)]
net.http.server: Lower score of wildcard handlers to ensure specific handlers beat them

12 years agomod_http_files: Change option name from http_path to http_files_dir
Matthew Wild [Thu, 26 Apr 2012 05:42:02 +0000 (06:42 +0100)]
mod_http_files: Change option name from http_path to http_files_dir

12 years agomod_http: Switch to single option for specifying HTTP app bases, http_paths. Keys...
Matthew Wild [Thu, 26 Apr 2012 05:41:11 +0000 (06:41 +0100)]
mod_http: Switch to single option for specifying HTTP app bases, http_paths. Keys are app/module names, values are base paths.

12 years agomod_http_files: Log 404 failure reason
Matthew Wild [Thu, 26 Apr 2012 05:30:29 +0000 (06:30 +0100)]
mod_http_files: Log 404 failure reason

12 years agomod_http_files: Return numeric error codes instead of custom error responses
Matthew Wild [Thu, 26 Apr 2012 05:10:14 +0000 (06:10 +0100)]
mod_http_files: Return numeric error codes instead of custom error responses

12 years agoutil.debug: Remove 'white' from boundary style (leave at default colour)
Matthew Wild [Thu, 26 Apr 2012 04:58:39 +0000 (05:58 +0100)]
util.debug: Remove 'white' from boundary style (leave at default colour)

12 years agoutil.termcolours: tohtml() for converting output to HTML. I don't know.
Matthew Wild [Thu, 26 Apr 2012 04:57:44 +0000 (05:57 +0100)]
util.termcolours: tohtml() for converting output to HTML. I don't know.

12 years agomod_bosh: Update informational message on GET
Matthew Wild [Thu, 26 Apr 2012 04:56:24 +0000 (05:56 +0100)]
mod_bosh: Update informational message on GET

12 years agomod_http: Use module:hook/unhook_event_object() so that handlers get unregistered...
Matthew Wild [Thu, 26 Apr 2012 04:40:04 +0000 (05:40 +0100)]
mod_http: Use module:hook/unhook_event_object() so that handlers get unregistered if mod_http is unloaded

12 years agomoduleapi: Add module:unhook_object_event()
Matthew Wild [Thu, 26 Apr 2012 04:39:27 +0000 (05:39 +0100)]
moduleapi: Add module:unhook_object_event()

12 years agonet.http.server: Fix to compare priority if path lengths are the same (logic fail)
Matthew Wild [Thu, 26 Apr 2012 03:24:43 +0000 (04:24 +0100)]
net.http.server: Fix to compare priority if path lengths are the same (logic fail)

12 years agoutil.debug: Some more magic constant fiddling. Don't ask me.
Matthew Wild [Wed, 25 Apr 2012 22:16:37 +0000 (23:16 +0100)]
util.debug: Some more magic constant fiddling. Don't ask me.

12 years agomod_bosh: Large commit to update to mod_http/net.http.server APIs. Becomes a shared...
Matthew Wild [Wed, 25 Apr 2012 22:10:32 +0000 (23:10 +0100)]
mod_bosh: Large commit to update to mod_http/net.http.server APIs. Becomes a shared module.

12 years agonet.http.server: Support for on_destroy callback on response objects, and a 'finished...
Matthew Wild [Wed, 25 Apr 2012 22:08:33 +0000 (23:08 +0100)]
net.http.server: Support for on_destroy callback on response objects, and a 'finished' flag to say when they are destroyed (responded to or connection closed)

12 years agomod_bosh: Optimisation, store reply_before value as waiting_requests value (saves...
Matthew Wild [Wed, 25 Apr 2012 18:57:46 +0000 (19:57 +0100)]
mod_bosh: Optimisation, store reply_before value as waiting_requests value (saves a lookup)

12 years agonet.http.server: Small fix to comment
Matthew Wild [Wed, 25 Apr 2012 14:02:27 +0000 (15:02 +0100)]
net.http.server: Small fix to comment

12 years agonet.http.server: Remove legacy compatibility
Matthew Wild [Wed, 25 Apr 2012 13:58:10 +0000 (14:58 +0100)]
net.http.server: Remove legacy compatibility

12 years agoportmanager: Fix selecting bind_interfaces from pre-0.9 config options.
Kim Alvefur [Wed, 25 Apr 2012 12:53:54 +0000 (14:53 +0200)]
portmanager: Fix selecting bind_interfaces from pre-0.9 config options.

12 years agoMakefile: Fix for net/http
Matthew Wild [Wed, 25 Apr 2012 02:56:26 +0000 (03:56 +0100)]
Makefile: Fix for net/http

12 years agomod_proxy65: Add multiplex pattern.
Waqas Hussain [Wed, 25 Apr 2012 02:55:13 +0000 (07:55 +0500)]
mod_proxy65: Add multiplex pattern.

12 years agoMerge timber->trunk - thanks everyone!
Matthew Wild [Tue, 24 Apr 2012 20:59:20 +0000 (21:59 +0100)]
Merge timber->trunk - thanks everyone!

12 years agonet.http.server: Handle results returned by handlers, and send as a response. Also...
Matthew Wild [Tue, 24 Apr 2012 18:07:12 +0000 (19:07 +0100)]
net.http.server: Handle results returned by handlers, and send as a response. Also removes explicit firing of '*', which can now be done via wildcard events.

12 years agonet.http.server: Remove debug message
Matthew Wild [Tue, 24 Apr 2012 18:05:45 +0000 (19:05 +0100)]
net.http.server: Remove debug message

12 years agoutil.helpers: Add show_events(), to show the events and handlers in a util.events...
Matthew Wild [Tue, 24 Apr 2012 17:54:34 +0000 (18:54 +0100)]
util.helpers: Add show_events(), to show the events and handlers in a util.events object

12 years agoutil.debug: Turn into a real-ish module ('debugx'), and require you call use() to...
Matthew Wild [Tue, 24 Apr 2012 17:53:50 +0000 (18:53 +0100)]
util.debug: Turn into a real-ish module ('debugx'), and require you call use() to override debug.traceback()

12 years agomod_proxy65: Port to portmanager, make a shared module
Matthew Wild [Tue, 24 Apr 2012 17:50:22 +0000 (18:50 +0100)]
mod_proxy65: Port to portmanager, make a shared module

12 years agomod_http: Fix specifying method in app route keys
Matthew Wild [Tue, 24 Apr 2012 15:02:30 +0000 (16:02 +0100)]
mod_http: Fix specifying method in app route keys

12 years agoportmanager: Add get_service_at(interface, port) and close(interface, port)
Matthew Wild [Tue, 24 Apr 2012 15:00:20 +0000 (16:00 +0100)]
portmanager: Add get_service_at(interface, port) and close(interface, port)

12 years agonet.server_event: Do not automatically close clients when closing a server port
Matthew Wild [Tue, 24 Apr 2012 14:52:30 +0000 (15:52 +0100)]
net.server_event: Do not automatically close clients when closing a server port

12 years agonet.server_select: Remove server from _server table when closing
Matthew Wild [Tue, 24 Apr 2012 14:42:35 +0000 (15:42 +0100)]
net.server_select: Remove server from _server table when closing

12 years agomod_admin_telnet: Add initial port:list() and port:close() commands
Matthew Wild [Tue, 24 Apr 2012 14:40:00 +0000 (15:40 +0100)]
mod_admin_telnet: Add initial port:list() and port:close() commands

12 years agoprosody: Load portmanager at startup, to ensure it is ready to receive item-added...
Matthew Wild [Tue, 24 Apr 2012 12:37:35 +0000 (13:37 +0100)]
prosody: Load portmanager at startup, to ensure it is ready to receive item-added events when modules are loaded

12 years agoMerge with Markus K?tter
Matthew Wild [Tue, 24 Apr 2012 02:23:44 +0000 (03:23 +0100)]
Merge with Markus K?tter

12 years agomod_http_files: Rename argument to reflect what it actually is
Kim Alvefur [Mon, 23 Apr 2012 22:17:15 +0000 (00:17 +0200)]
mod_http_files: Rename argument to reflect what it actually is

12 years agomod_httpserver: Rename to mod_http_files
Kim Alvefur [Mon, 23 Apr 2012 21:37:43 +0000 (23:37 +0200)]
mod_httpserver: Rename to mod_http_files

12 years agomod_httpserver: Adapt to use the new HTTP API
Kim Alvefur [Mon, 23 Apr 2012 21:36:50 +0000 (23:36 +0200)]
mod_httpserver: Adapt to use the new HTTP API

12 years agomod_http: Pass portion of path that matched wildcard to wildcard handlers, as a secon...
Matthew Wild [Mon, 23 Apr 2012 20:34:05 +0000 (21:34 +0100)]
mod_http: Pass portion of path that matched wildcard to wildcard handlers, as a second parameter

12 years agonet.http.server: Support for wildcard events (events that end with '/*')
Matthew Wild [Mon, 23 Apr 2012 20:29:18 +0000 (21:29 +0100)]
net.http.server: Support for wildcard events (events that end with '/*')

12 years agomod_http: Support for default_path in apps
Matthew Wild [Mon, 23 Apr 2012 17:23:49 +0000 (18:23 +0100)]
mod_http: Support for default_path in apps

12 years agomoduleapi: Add module:add_timer(delay, callback) - automatically halts the timer...
Matthew Wild [Mon, 23 Apr 2012 14:38:40 +0000 (15:38 +0100)]
moduleapi: Add module:add_timer(delay, callback) - automatically halts the timer on module unload

12 years agomodulemanager: Set module.loaded = false on unload
Matthew Wild [Mon, 23 Apr 2012 14:38:36 +0000 (15:38 +0100)]
modulemanager: Set module.loaded = false on unload

12 years agomod_http: Revamp module for new API and config
Matthew Wild [Mon, 23 Apr 2012 13:16:59 +0000 (14:16 +0100)]
mod_http: Revamp module for new API and config

12 years agomoduleapi: module:depends(): Load shared modules onto the current host even if they...
Matthew Wild [Mon, 23 Apr 2012 13:15:07 +0000 (14:15 +0100)]
moduleapi: module:depends(): Load shared modules onto the current host even if they are loaded globally already

12 years agomodulemanager: Report errors that happen when loading a shared module onto its origin...
Matthew Wild [Mon, 23 Apr 2012 13:11:10 +0000 (14:11 +0100)]
modulemanager: Report errors that happen when loading a shared module onto its original host

12 years agomoduleapi: module:provides(): Add "-provider" onto the key name
Matthew Wild [Mon, 23 Apr 2012 13:10:04 +0000 (14:10 +0100)]
moduleapi: module:provides(): Add "-provider" onto the key name

12 years agomoduleapi: module:provides(): Fix usage of wrong table
Matthew Wild [Mon, 23 Apr 2012 13:09:35 +0000 (14:09 +0100)]
moduleapi: module:provides(): Fix usage of wrong table

12 years agonet.http.server: Fix legacy net.httpserver fallback (httpserver is no longer a global).
Waqas Hussain [Sun, 22 Apr 2012 18:44:21 +0000 (23:44 +0500)]
net.http.server: Fix legacy net.httpserver fallback (httpserver is no longer a global).