From 06c0365b4405ad4aff6e067b9b85cd9612654686 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 22 Aug 2018 19:26:52 +0200 Subject: [PATCH 1/2] Fix proxy behaviour --- lib/downloader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/downloader.cpp b/lib/downloader.cpp index e892355d..cb48f17a 100644 --- a/lib/downloader.cpp +++ b/lib/downloader.cpp @@ -102,10 +102,10 @@ namespace HTTP{ } if (proxied && !ssl){ H.url = link.getProxyUrl(); - if (proxyUrl.port.size()){ - H.SetHeader("Host", proxyUrl.host + ":" + proxyUrl.port); + if (link.port.size()){ + H.SetHeader("Host", link.host + ":" + link.port); }else{ - H.SetHeader("Host", proxyUrl.host); + H.SetHeader("Host", link.host); } }else{ H.url = "/" + Encodings::URL::encode(link.path, "/:=@[]"); From cd514026ec2bda813533c2c8b9e986c4396afa6e Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 23 Aug 2018 12:30:10 +0200 Subject: [PATCH 2/2] Made RTMP connect response more compatible with other software --- src/output/output_rtmp.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/output/output_rtmp.cpp b/src/output/output_rtmp.cpp index 27405122..15584e79 100644 --- a/src/output/output_rtmp.cpp +++ b/src/output/output_rtmp.cpp @@ -446,10 +446,6 @@ namespace Mist { app_name = amfData.getContentP(2)->getContentP("tcUrl")->StrValue(); app_name = app_name.substr(app_name.find('/', 7) + 1); RTMPStream::chunk_snd_max = 65536; //64KiB - myConn.SendNow(RTMPStream::SendCTL(1, RTMPStream::chunk_snd_max)); //send chunk size max (msg 1) - myConn.SendNow(RTMPStream::SendCTL(5, RTMPStream::snd_window_size)); //send window acknowledgement size (msg 5) - myConn.SendNow(RTMPStream::SendCTL(6, RTMPStream::rec_window_size)); //send rec window acknowledgement size (msg 6) - myConn.SendNow(RTMPStream::SendUSR(0, 1)); //send UCM StreamBegin (0), stream 1 //send a _result reply AMF::Object amfReply("container", AMF::AMF0_DDV_CONTAINER); amfReply.addContent(AMF::Object("", "_result")); //result success @@ -467,6 +463,11 @@ namespace Mist { //amfReply.getContentP(3)->addContent(AMF::Object("data", AMF::AMF0_ECMA_ARRAY)); //amfReply.getContentP(3)->getContentP(4)->addContent(AMF::Object("version", "3,5,4,1004")); sendCommand(amfReply, messageType, streamId); + //Send other stream-related packets + myConn.SendNow(RTMPStream::SendCTL(1, RTMPStream::chunk_snd_max)); //send chunk size max (msg 1) + myConn.SendNow(RTMPStream::SendCTL(5, RTMPStream::snd_window_size)); //send window acknowledgement size (msg 5) + myConn.SendNow(RTMPStream::SendCTL(6, RTMPStream::rec_window_size)); //send rec window acknowledgement size (msg 6) + myConn.SendNow(RTMPStream::SendUSR(0, 1)); //send UCM StreamBegin (0), stream 1 //send onBWDone packet - no clue what it is, but real server sends it... //amfReply = AMF::Object("container", AMF::AMF0_DDV_CONTAINER); //amfReply.addContent(AMF::Object("", "onBWDone"));//result