From 6eeb7ae5b2d79f6a16db2c68918b271d2bbf5893 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 2 Jan 2016 16:50:22 -0600 Subject: [PATCH] Add UUID on serverinfo and add a TODO for HTTP serverinfo --- .../src/com/limelight/nvstream/http/NvHTTP.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/moonlight-common/src/com/limelight/nvstream/http/NvHTTP.java b/moonlight-common/src/com/limelight/nvstream/http/NvHTTP.java index 637cddcd..a3e2cff2 100644 --- a/moonlight-common/src/com/limelight/nvstream/http/NvHTTP.java +++ b/moonlight-common/src/com/limelight/nvstream/http/NvHTTP.java @@ -175,8 +175,15 @@ public class NvHTTP { public String getServerInfo() throws MalformedURLException, IOException, XmlPullParserException { String resp; + + // + // TODO: Shield Hub uses HTTP for this and is able to get an accurate PairStatus with HTTP. + // For some reason, we always see PairStatus is 0 over HTTP and only 1 over HTTPS. It looks + // like there are extra request headers required to make this stuff work over HTTP. + // + try { - resp = openHttpConnectionToString(baseUrlHttps + "/serverinfo?uniqueid=" + uniqueId, true); + resp = openHttpConnectionToString(baseUrlHttps + "/serverinfo?"+buildUniqueIdUuidString(), true); // This will throw an exception if the request came back with a failure status. // We want this because it will throw us into the HTTP case if the client is unpaired.