Kim Alvefur
43531740f9
util: Prefix module imports with prosody namespace
3 years ago
Matthew Wild
92cec56e97
util.xmppstream: Allow dynamically configuring the stanza size limit for a stream
...
This may be useful for any plugins that want to experiment with different policies
for stanza size limits (e.g. unauthenticated vs authenticated streams).
5 years ago
Matthew Wild
7cb3ec61d5
util.xmppstream: Mark bytes for stream closure as handled
5 years ago
Matthew Wild
d126ee88bc
util.xmppstream: Reduce default xmppstream limit to 1MB
5 years ago
Kim Alvefur
a4a008e046
util.xmppstream: Send <?xml?> declaration in same call as stream open
...
If network_settings.opportunistic_writes is enabled then this would
previously have resulted in two socket writes, and possibly two packets
being sent. This caused some issues in older versions of Gajim, which
apparently expected the stream opening in the first packet, and thus it
could not connect.
With this change and opportunistic_writes enabled, the first packet
should contain both the xml declaration and the stream open tag.
Without opportunistic_writes, there should be no observable change.
Tested with Gajim 1.1.2 (on same machine). Unsure if loopback behaves
differently than the network here.
5 years ago
Kim Alvefur
41e4648d27
util.xmppstream: Ensure stream 'id' is always present ( fix #1626 )
...
Backout c2d144d3f8dd
5 years ago
Matthew Wild
93c75744ca
util.xmppstream: Explicitly release old parser object on stream reset
8 years ago
Matthew Wild
6fbe81217b
util.xmppstream: Perfom validation of XML declaration parameters
8 years ago
Kim Alvefur
43b814a83b
vairious: Add annotation when an empty environment is set [luacheck]
8 years ago
Kim Alvefur
1438a38845
util: Various minor changes to please [luacheck]
8 years ago
Kim Alvefur
1e86443ee7
util.xmppstream: Inherit xml:lang from stream to stanzas ( fixes #1401 )
7 years ago
Matthew Wild
a1bcc0b591
util.xmppstream: Remove namespace tracking, it's broken as implemented
...
The code fails to handle namespaces on the initial opening tag (when 'stanza' is nil). Fixing this
seems not worth the effort for a feature that is not being used.
10 years ago
Matthew Wild
dd37beeff9
util.stanza, util.xml, util.xmppstream: Add support for tracking defined namespaces and their prefix (stanza.namespaces), knowing/preserving prefix names is required for some applications (thanks daurnimator)
10 years ago
Kim Alvefur
eaa823a597
util.*: Remove use of module() function, make all module functions local and return them in a table at the end
11 years ago
Kim Alvefur
6007de18c4
util.xmppstream: Don't include empty stream ID in stream header (got here from mod_c2s)
12 years ago
Matthew Wild
1bb5caff25
util.xmppstream: When error is 'no-stream', pass the received tagname to the error handler
12 years ago
Kim Alvefur
0c1de192ab
util.xmppstream: Check for callback that may add stream header attributes
12 years ago
Kim Alvefur
e06966ee43
mod_c2s, mod_s2s, mod_component, util.xmppstream: Move all session:open_stream() functions to util.xmppstream
12 years ago
Matthew Wild
ae885de6a2
util.xmppstream: Also disable CharacterData merging after stream restarts
12 years ago
Matthew Wild
507456f883
util.xmppstream: Disable LuaExpat's buffering (if possible)
12 years ago
Matthew Wild
16a37370eb
util.xmppstream: Implement stanza size limiting, default limit 10MB
12 years ago
Florian Zeitz
1d833bb807
Remove all trailing whitespace
13 years ago
Waqas Hussain
0767f24153
util.xmppstream: Include error stanza in error message if no error handler is available.
13 years ago
Waqas Hussain
19bcbcde9c
util.xmppstream: Optimize attribute processing.
14 years ago
Waqas Hussain
36936e4b05
util.xmppstream: Have faith in the XML parser matching start and end tags.
14 years ago
Waqas Hussain
5b8670c951
util.xmppstream: Remove some unnecessary code.
14 years ago
Waqas Hussain
56975d6c63
util.dependencies, util.xmppstream: Move LuaExpat version checking to util.dependencies.
14 years ago
Waqas Hussain
0c22db44a1
util.xmppstream: A little cleanup.
14 years ago
Matthew Wild
def542a8fe
util.xmppstream: Allow stream_ns = "" for parsing streams with no xmlns
15 years ago
Matthew Wild
0c8d2cefc7
util.xmppstream: Expose ns_separator and ns_pattern
15 years ago
Matthew Wild
c662c73374
util.xmppstream: Expose ns_separator and ns_pattern
15 years ago
Waqas Hussain
57683f24cf
util.xmppstream: Check to make sure parser.stop is present before calling it.
15 years ago
Matthew Wild
a587c56a9f
util.xmppstream: Reject XML comments, processing instructions and (if supported by LuaExpat) DTDs. If not supported, log a warning.
15 years ago
Matthew Wild
ad47950b37
util.xmppstream: Reject XML comments, processing instructions and (if supported by LuaExpat) DTDs. If not supported, log a warning.
15 years ago
Waqas Hussain
fb331b2a58
util.xmppstream: Optimized stanza building by bypassing the stanza API.
15 years ago
Matthew Wild
bfc6ce8561
util.xmppstream: Allow stream_ns = "" for parsing streams with no xmlns
15 years ago
Waqas Hussain
f79be6e720
util.xmppstream: Fix logger name.
15 years ago
Waqas Hussain
00171e2bb5
util.xmppstream: Fix logger name.
15 years ago
Waqas Hussain
539b221189
util.stanza, util.xmppstream, core.xmlhandlers: Allow stanza.last_add to be nil, and set it nil by default. Saves a table allocation per-element. 20% faster stanza building.
15 years ago
Waqas Hussain
22ee83cf0c
util.xmppstream: Preserve the stream content namespace on descendents of elements which are in another namespace.
15 years ago
Waqas Hussain
b7e51a203d
Monster whitespace commit (beware the whitespace monster).
15 years ago
Waqas Hussain
0efcfb0a8a
util.xmppstream: Removed some useless property assignments.
16 years ago
Matthew Wild
48b695c7e5
util.xmppstream: Add set_session() method to change the session that a stream is associated with
16 years ago
Matthew Wild
aa0ed5d64b
util.xmppstream: Stream objects now just have feed/reset methods
16 years ago
Matthew Wild
2c597f0fa4
util.xmppstream: new() now returns a parser object
16 years ago
Matthew Wild
1f06159ffa
util.xmppstream: Initial commit
16 years ago
Waqas Hussain
32befbdd6e
xmlhandlers: Removed unused variables.
16 years ago
Waqas Hussain
b713b42e1b
xmlhandlers: A little optimization.
16 years ago
Waqas Hussain
05f3218e10
xmlhandlers: Rearranged a little code.
16 years ago
Waqas Hussain
e8b118df7d
xmlhandlers: Fixed indentation and added some semicolons.
16 years ago