Skip to content

Commit

Permalink
Updating the /json/version to emit valid version. The data is still i…
Browse files Browse the repository at this point in the history
…ncorrect and we need to find APIs from Edge to discover the UA and version.
  • Loading branch information
andysterland committed Apr 14, 2016
1 parent 5d12540 commit d107fe0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions EdgeDiagnosticsAdapter/WebSocketHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ void WebSocketHandler::OnHttp(websocketpp::connection_hdl hdl)
else if (requestedResource == "/json/version")
{
// To do: This will need to change to support Edge
CStringA ieVersion = Helpers::GetFileVersion(L"C:\\Windows\\System32\\mshtml.dll");
CStringA browser = "Internet Explorer " + ieVersion;
CStringA edgeVersion = Helpers::GetFileVersion(L"C:\\Windows\\System32\\edgehtml.dll");
CStringA browser = "Microsoft Edge " + edgeVersion;
browser = Helpers::EscapeJsonString(CString(browser));


Expand All @@ -155,10 +155,10 @@ void WebSocketHandler::OnHttp(websocketpp::connection_hdl hdl)
CStringA userAgent = Helpers::EscapeJsonString(CString(pszUserAgent));

ss << "{" << endl;
ss << " \"Browser\" : \"" << browser << "\"" << endl;
ss << " \"Protocol-Version\" : \"" << EdgeDiagnosticsAdapter::s_Protocol_Version << "\"" << endl;
ss << " \"User-Agent\" : \"" << userAgent << "\"" << endl;
ss << " \"WebKit-Version\" : \"" << "0" << "\"" << endl;
ss << " \"Browser\" : \"" << browser << "\"" << "," << endl;
ss << " \"Protocol-Version\" : \"" << EdgeDiagnosticsAdapter::s_Protocol_Version << "\"" << "," << endl;
ss << " \"User-Agent\" : \"" << userAgent << "\"" << "," << endl;
ss << " \"WebKit-Version\" : \"" << "0" << "\"" << "" << endl;
ss << "}";
}

Expand Down

0 comments on commit d107fe0

Please sign in to comment.