Replies: 1 comment
-
You probably don't want to use full http requests and responses, as those aren't streaming. Since your goal is to proxy and modify headers, I think it'd be better to keep simple pipelines with HttpServer/ClientCodec, and modify the HttpRequest/Response/Content objects that pass through. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to build a server that can help me to add some auth headers to help vlc playing web video.
My idea is using a url like "http://127.0.0.1/url=https://xxx.mp4" in vlc,and create a netty server to receive this request,then vlc will send this request to netty,after that , a handler will process this request and get a response include a video stream,netty can return it to vlc and it can playing it.
My question now is:how to get a inputstream from response in netty?I found that DefaultFullHttpResponse have a method
content().readBytes()
can using a stream,but it need a length parmer i can't get,so i using okhttpresponse.body.byteStream()
to get the stream,and then response a ChunkedStream that include the inputstream from okhttp.But my vlc player can't play it and return a error:
I want to ask is my idea correct? If so, why does the VLC not work properly? If not, can you tell me the right way to do this?
Be deeply grateful for your help!
Beta Was this translation helpful? Give feedback.
All reactions