Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
22e0fd0a
Unverified
Commit
22e0fd0a
authored
Nov 13, 2017
by
Dave Cridland
Committed by
GitHub
Nov 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #911 from surevine/of1423
OF-1423 Honour configuration for message size
parents
4cdab6a2
1b459b50
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
OpenfireWebSocketServlet.java
...software/openfire/websocket/OpenfireWebSocketServlet.java
+4
-0
No files found.
src/java/org/jivesoftware/openfire/websocket/OpenfireWebSocketServlet.java
View file @
22e0fd0a
...
@@ -27,6 +27,7 @@ import org.jivesoftware.openfire.SessionManager;
...
@@ -27,6 +27,7 @@ import org.jivesoftware.openfire.SessionManager;
import
org.jivesoftware.openfire.XMPPServer
;
import
org.jivesoftware.openfire.XMPPServer
;
import
org.jivesoftware.openfire.session.ClientSession
;
import
org.jivesoftware.openfire.session.ClientSession
;
import
org.jivesoftware.openfire.session.LocalSession
;
import
org.jivesoftware.openfire.session.LocalSession
;
import
org.jivesoftware.util.JiveGlobals
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -66,6 +67,9 @@ public class OpenfireWebSocketServlet extends WebSocketServlet {
...
@@ -66,6 +67,9 @@ public class OpenfireWebSocketServlet extends WebSocketServlet {
if
(
XmppWebSocket
.
isCompressionEnabled
())
{
if
(
XmppWebSocket
.
isCompressionEnabled
())
{
factory
.
getExtensionFactory
().
register
(
"permessage-deflate"
,
PerMessageDeflateExtension
.
class
);
factory
.
getExtensionFactory
().
register
(
"permessage-deflate"
,
PerMessageDeflateExtension
.
class
);
}
}
final
int
messageSize
=
JiveGlobals
.
getIntProperty
(
"xmpp.parser.buffer.size"
,
1048576
);
factory
.
getPolicy
().
setMaxTextMessageBufferSize
(
messageSize
*
5
);
factory
.
getPolicy
().
setMaxTextMessageSize
(
messageSize
);
factory
.
setCreator
(
new
WebSocketCreator
()
{
factory
.
setCreator
(
new
WebSocketCreator
()
{
@Override
@Override
public
Object
createWebSocket
(
ServletUpgradeRequest
req
,
ServletUpgradeResponse
resp
)
public
Object
createWebSocket
(
ServletUpgradeRequest
req
,
ServletUpgradeResponse
resp
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment