Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/CompressExtension.java10
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/PerMessageDeflateExtension.java2
2 files changed, 7 insertions, 5 deletions
diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/CompressExtension.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/CompressExtension.java
index 6fc9b538fc..ac32ad6d72 100644
--- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/CompressExtension.java
+++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/CompressExtension.java
@@ -407,12 +407,13 @@ public abstract class CompressExtension extends AbstractExtension
{
Frame frame = entry.frame;
BatchMode batchMode = entry.batchMode;
- if (OpCode.isControlFrame(frame.getOpCode()) || !frame.hasPayload())
+ if (OpCode.isControlFrame(frame.getOpCode()))
{
+ // Do not deflate control frames
nextOutgoingFrame(frame,this,batchMode);
return;
}
-
+
compress(entry,true);
}
@@ -434,7 +435,7 @@ public abstract class CompressExtension extends AbstractExtension
// no input supplied
needsCompress = false;
}
-
+
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] output = new byte[outputLength];
@@ -486,7 +487,8 @@ public abstract class CompressExtension extends AbstractExtension
}
else if (fin)
{
- // Special case: 8.2.3.6. Generating an Empty Fragment Manually
+ // Special case: 7.2.3.6. Generating an Empty Fragment Manually
+ // https://tools.ietf.org/html/rfc7692#section-7.2.3.6
payload = ByteBuffer.wrap(new byte[] { 0x00 });
}
diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/PerMessageDeflateExtension.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/PerMessageDeflateExtension.java
index c307e5356b..93ea4fbcbf 100644
--- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/PerMessageDeflateExtension.java
+++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/PerMessageDeflateExtension.java
@@ -33,7 +33,7 @@ import org.eclipse.jetty.websocket.common.OpCode;
/**
* Per Message Deflate Compression extension for WebSocket.
* <p>
- * Attempts to follow <a href="https://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-12">draft-ietf-hybi-permessage-compression-12</a>
+ * Attempts to follow <a href="https://tools.ietf.org/html/rfc7692">Compression Extensions for WebSocket</a>
*/
public class PerMessageDeflateExtension extends CompressExtension
{

Back to the top