Fixed a bug where RtspResponseDecoder generates a request object instead of a response object
This commit is contained in:
parent
34b2ed1a8d
commit
b2f550cb3b
@ -17,9 +17,10 @@ package org.jboss.netty.handler.codec.rtsp;
|
|||||||
|
|
||||||
import org.jboss.netty.buffer.ChannelBuffer;
|
import org.jboss.netty.buffer.ChannelBuffer;
|
||||||
import org.jboss.netty.handler.codec.frame.TooLongFrameException;
|
import org.jboss.netty.handler.codec.frame.TooLongFrameException;
|
||||||
import org.jboss.netty.handler.codec.http.DefaultHttpRequest;
|
import org.jboss.netty.handler.codec.http.DefaultHttpResponse;
|
||||||
import org.jboss.netty.handler.codec.http.HttpMessage;
|
import org.jboss.netty.handler.codec.http.HttpMessage;
|
||||||
import org.jboss.netty.handler.codec.http.HttpResponse;
|
import org.jboss.netty.handler.codec.http.HttpResponse;
|
||||||
|
import org.jboss.netty.handler.codec.http.HttpResponseStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decodes {@link ChannelBuffer}s into RTSP responses represented in
|
* Decodes {@link ChannelBuffer}s into RTSP responses represented in
|
||||||
@ -74,12 +75,13 @@ public class RtspResponseDecoder extends RtspMessageDecoder {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected HttpMessage createMessage(String[] initialLine) throws Exception {
|
protected HttpMessage createMessage(String[] initialLine) throws Exception {
|
||||||
return new DefaultHttpRequest(RtspVersions.valueOf(initialLine[2]),
|
return new DefaultHttpResponse(
|
||||||
RtspMethods.valueOf(initialLine[0]), initialLine[1]);
|
RtspVersions.valueOf(initialLine[0]),
|
||||||
|
new HttpResponseStatus(Integer.valueOf(initialLine[1]), initialLine[2]));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean isDecodingRequest() {
|
protected boolean isDecodingRequest() {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user