Skip to content

Commit cf6d987

Browse files
committed
Merge API documentation update to master to align text with the online API reference. Addresses issue #36.
2 parents 9285af7 + 18c0cde commit cf6d987

5 files changed

Lines changed: 27 additions & 13 deletions

File tree

1.35 KB
Binary file not shown.
2.95 KB
Binary file not shown.

Remote Server/ServerForm.cs

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5489,19 +5489,33 @@ private void ReturnImageArray(RequestData requestData)
54895489
}
54905490
if (DebugTraceState) LogMessage1(requestData, requestData.Elements[URL_ELEMENT_METHOD], $"Response compression type: {compressionType}");
54915491

5492-
// Determine whether the client supports base64 hand-off transfer, if so, this will be used
5493-
if (requestData.Request.Headers[SharedConstants.BASE64_HANDOFF_HEADER] == SharedConstants.BASE64_HANDOFF_SUPPORTED) // Client supports base64 hand-off
5492+
try
5493+
{
5494+
// Determine whether the client supports base64 hand-off transfer, if so, this will be used
5495+
if (requestData.Request.Headers[SharedConstants.BASE64_HANDOFF_HEADER] == SharedConstants.BASE64_HANDOFF_SUPPORTED) // Client supports base64 hand-off
5496+
{
5497+
base64HandoffRequested = true;
5498+
requestData.Response.AddHeader(SharedConstants.BASE64_HANDOFF_HEADER, SharedConstants.BASE64_HANDOFF_SUPPORTED); // Add a header indicating to the client that a binary formatted image is available for faster processing
5499+
if (DebugTraceState) LogMessage1(requestData, requestData.Elements[URL_ELEMENT_METHOD], $"Base64 encoding supported - Header {SharedConstants.BASE64_HANDOFF_SUPPORTED} = {requestData.Request.Headers[SharedConstants.BASE64_HANDOFF_SUPPORTED]}");
5500+
}
5501+
}
5502+
catch (Exception ex)
54945503
{
5495-
base64HandoffRequested = true;
5496-
requestData.Response.AddHeader(SharedConstants.BASE64_HANDOFF_HEADER, SharedConstants.BASE64_HANDOFF_SUPPORTED); // Add a header indicating to the client that a binary formatted image is available for faster processing
5497-
if (DebugTraceState) LogMessage1(requestData, requestData.Elements[URL_ELEMENT_METHOD], $"Base64 encoding supported - Header {SharedConstants.BASE64_HANDOFF_SUPPORTED} = {requestData.Request.Headers[SharedConstants.BASE64_HANDOFF_SUPPORTED]}");
5504+
LogMessage1(requestData, requestData.Elements[URL_ELEMENT_METHOD], $"Exception testing for base64 hand-off header:\r\n{ex}");
54985505
}
54995506

5500-
// Determine whether the client request that the image be returned as a byte array
5501-
if (requestData.Request.Headers[SharedConstants.ACCEPT_HEADER_NAME].ToLowerInvariant().Contains(SharedConstants.IMAGE_BYTES_MIME_TYPE)) // Client supports image bytes transfer
5507+
try
5508+
{
5509+
// Determine whether the client request that the image be returned as a byte array
5510+
if (requestData.Request.Headers[SharedConstants.ACCEPT_HEADER_NAME].ToLowerInvariant().Contains(SharedConstants.IMAGE_BYTES_MIME_TYPE)) // Client supports image bytes transfer
5511+
{
5512+
imageBytesRequested = true;
5513+
if (DebugTraceState) LogMessage1(requestData, requestData.Elements[URL_ELEMENT_METHOD], $"Image bytes requested - Received header {requestData.Request.Headers[SharedConstants.ACCEPT_HEADER_NAME]}");
5514+
}
5515+
}
5516+
catch (Exception ex)
55025517
{
5503-
imageBytesRequested = true;
5504-
if (DebugTraceState) LogMessage1(requestData, requestData.Elements[URL_ELEMENT_METHOD], $"Image bytes requested - Received header {requestData.Request.Headers[SharedConstants.ACCEPT_HEADER_NAME]}");
5518+
LogMessage1(requestData, requestData.Elements[URL_ELEMENT_METHOD], $"Exception testing for image bytes header:\r\n{ex}");
55055519
}
55065520

55075521
sw.Start(); // Start the timing stopwatch

Setup/ASCOM Remote Setup.iss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#define public RemoteClientBaseClassesName "ASCOM.RemoteClientBaseClasses" ; Remote client support DLL name
1616
#define public ASCOMRemoteDocumentationFileName "ASCOM Remote Installation and Configuration.pdf"; ASCOM Remote documentation file
1717

18-
; Specifiy debug or release build;define public BuildType "Debug" ; Type of build - Release or Debug
19-
#define public BuildType "Release" ; Type of build - Release or Debug
18+
; Specifiy debug or release build#define public BuildType "Debug" ; Type of build - Release or Debug
19+
;define public BuildType "Release" ; Type of build - Release or Debug
2020

2121
[Setup]
2222
AppID={{0ee690ae-7927-4ee7-b851-f5877c077ff5}

SignASCOMRemote.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ if errorlevel 1 (
4040
echo signtool sign /a /as /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "J:\ASCOMRemote\Remote Client Device Base Classes\bin\Release\ASCOM.RemoteClientBaseClasses.dll"
4141
echo signtool sign /a /fd SHA256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "J:\ASCOMRemote\Remote Client Local Server\bin\Release\RestSharp.dll"
4242
echo signtool sign /a /as /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "J:\ASCOMRemote\Remote Client Local Server\bin\Release\RestSharp.dll"
43-
signtool sign /a /fd SHA256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "J:\ASCOMRemote\Remote Server\bin\Debug\ASCOM.RemoteServer.exe"
44-
signtool sign /a /as /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "J:\ASCOMRemote\Remote Server\bin\Debug\ASCOM.RemoteServer.exe"
43+
signtool sign /a /fd SHA256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "J:\ASCOMRemote\Remote Server\bin\Release\ASCOM.RemoteServer.exe"
44+
signtool sign /a /as /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "J:\ASCOMRemote\Remote Server\bin\Release\ASCOM.RemoteServer.exe"
4545
signtool sign /a /fd SHA256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "J:\ASCOMRemote\Remote Server\bin\Release\ASCOM.Common.dll"
4646
signtool sign /a /as /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "J:\ASCOMRemote\Remote Server\bin\Release\ASCOM.Common.dll"
4747
signtool sign /a /fd SHA256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "J:\ASCOMRemote\SetNetworkPermissions\bin\Release\ASCOM.SetNetworkPermissions.exe"

0 commit comments

Comments
 (0)