The fix for RtspResponseDecoder should be applied to all RTSP decoders
This commit is contained in:
parent
0c9202ab75
commit
d51ccd2211
@ -90,4 +90,18 @@ public abstract class RtspMessageDecoder extends HttpMessageDecoder {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isContentAlwaysEmpty(HttpMessage msg) {
|
||||
// Unlike HTTP, RTSP always assumes zero-length body if Content-Length
|
||||
// header is absent.
|
||||
boolean empty = super.isContentAlwaysEmpty(msg);
|
||||
if (empty) {
|
||||
return true;
|
||||
}
|
||||
if (!msg.containsHeader(RtspHeaders.Names.CONTENT_LENGTH)) {
|
||||
return true;
|
||||
}
|
||||
return empty;
|
||||
}
|
||||
}
|
||||
|
@ -80,20 +80,6 @@ public class RtspResponseDecoder extends RtspMessageDecoder {
|
||||
new HttpResponseStatus(Integer.valueOf(initialLine[1]), initialLine[2]));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isContentAlwaysEmpty(HttpMessage msg) {
|
||||
// Unlike HTTP, RTSP always assumes zero-length body if Content-Length
|
||||
// header is absent.
|
||||
boolean empty = super.isContentAlwaysEmpty(msg);
|
||||
if (empty) {
|
||||
return true;
|
||||
}
|
||||
if (!msg.containsHeader(RtspHeaders.Names.CONTENT_LENGTH)) {
|
||||
return true;
|
||||
}
|
||||
return empty;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isDecodingRequest() {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user