ASCOMInitiative / ASCOMRemote

The ASCOM REST based Remote Driver Server and Remote Access Clients
GNU General Public License v3.0
57 stars 16 forks source link

Chunked encoding upload is not supported on the HTTP/1.0 protocol. #14

Closed mikeread2018 closed 4 years ago

mikeread2018 commented 4 years ago

Hi,

I have just installed 1.6.7424.28304 and get the following when taking an image with an ASI533. Anything I can do to resolve this?

Running on Windows 10 x64 Pro

16:16:51.329 Main Unhandled exception: System.Net.ProtocolViolationException: Chunked encoding upload is not supported on the HTTP/1.0 protocol. at System.Net.HttpListenerResponse.set_EntitySendFormat(EntitySendFormat value) at ASCOM.Remote.ServerForm.ReturnImageArrayBase64(RequestData requestData) in J:\ASCOMRemote\Remote Server\ServerForm.cs:line 4946 at ASCOM.Remote.ServerForm.ProcessDriverCommand(RequestData requestData) in J:\ASCOMRemote\Remote Server\ServerForm.cs:line 2723 at ASCOM.Remote.DriverHostForm.ProcessCommand(Object requestData) in J:\ASCOMRemote\Remote Server\DriverHostForm.cs:line 97 at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart(Object obj)

Peter-Simpson commented 4 years ago

Hi Mike,

Please can you confirm what client application and client driver you are using and also describe the network topology between the client and the server.

This issue isn't one that I've seen before in almost 2 years of use so there may be something about your particular environment that is triggering the behaviour or it could be something wrong in Platform 6.5.

Thanks, Peter

mikeread2018 commented 4 years ago

Hi Peter,

Thanks for coming back.

Client Application:

CCDciel Version beta 0.9.70-2181-efefc61 2020/04/09 09:51:58 Compiled with: Lazarus 2.0.6.0 Free Pascal 3.0.4 Win32-i386-win32

The “server” is running on a Dell 3070 I3, 4Gb RAM. Windows 10 Pro. Connected over WiFi (2Ghz). The client PC is a Dell XPS 15 I7 9th Gen. Also connected over WiFi.

The Camera ASI533 is connected USB3.

Happy to run any diags etc…

Kind regards

Mike

From: Peter Simpson notifications@github.com Sent: 06 May 2020 16:43 To: ASCOMInitiative/ASCOMRemote ASCOMRemote@noreply.github.com Cc: Mike Read mread@mike-read.co.uk; Author author@noreply.github.com Subject: Re: [ASCOMInitiative/ASCOMRemote] Chunked encoding upload is not supported on the HTTP/1.0 protocol. (#14)

Hi Mike,

Please can you confirm what client application and client driver you are using and also describe the network topology between the client and the server.

This issue isn't one that I've seen before in almost 2 years of use so there may be something about your particular environment that is triggering the behaviour or it could be something wrong in Platform 6.5.

Thanks, Peter

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ASCOMInitiative/ASCOMRemote/issues/14#issuecomment-624726373, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJNSQF6I64D6BADP7QSLJ7TRQGAPPANCNFSM4M2RMLPQ.

mikeread2018 commented 4 years ago

Hi Peter, Also just disconnected from the WiFi and Cat6 to a switch - still the same issue

Peter-Simpson commented 4 years ago

Hi Mike,

Thanks for testing, I think I now know what is going on. CdC uses its own built-in Alpaca client rather than either an ASCOM Remote Client or a Dynamic Client that comes with Platform 6.5. The clients that I've produced all use HTTP/1.1 and support chunked encoding, so the Remote Server was hard wired to enable chunked encoding.

It seems that CdC is using HTTP/1.0, which doesn't support chunked encoding, and consequently the Remote Server was complaining when it tried to enable chunking support.

I've now made the Remote Server only enable chunking when an HTTP/1.1 connection is in use and so it should now work correctly with CdC. please can you give this version a go?

ASCOM Remote Installer

Thanks, Peter

mikeread2018 commented 4 years ago

Hi Peter,

I’m still getting this:

20:16:19.769 Main Unhandled exception: System.Net.ProtocolViolationException: Chunked encoding upload is not supported on the HTTP/1.0 protocol. at System.Net.HttpListenerResponse.set_EntitySendFormat(EntitySendFormat value) at ASCOM.Remote.ServerForm.ReturnImageArrayBase64(RequestData requestData) in J:\ASCOMRemote\Remote Server\ServerForm.cs:line 4949 at ASCOM.Remote.ServerForm.ProcessDriverCommand(RequestData requestData) in J:\ASCOMRemote\Remote Server\ServerForm.cs:line 2723 at ASCOM.Remote.DriverHostForm.ProcessCommand(Object requestData) in J:\ASCOMRemote\Remote Server\DriverHostForm.cs:line 97 at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart(Object obj)

From: Peter Simpson notifications@github.com Sent: 06 May 2020 20:01 To: ASCOMInitiative/ASCOMRemote ASCOMRemote@noreply.github.com Cc: Mike Read mread@mike-read.co.uk; Author author@noreply.github.com Subject: Re: [ASCOMInitiative/ASCOMRemote] Chunked encoding upload is not supported on the HTTP/1.0 protocol. (#14)

Hi Mike,

Thanks for testing, I think I now know what is going on. CdC uses its own built-in Alpaca client rather than either an ASCOM Remote Client or a Dynamic Client that comes with Platform 6.5. The clients that I've produced all use HTTP/1.1 and support chunked encoding, so the Remote Server was hard wired to enable chunked encoding.

It seems that CdC is using HTTP/1.0, which doesn't support chunked encoding, and consequently the Remote Server was complaining when it tried to enable chunking support.

I've now made the Remote Server only enable chunking when an HTTP/1.1 connection is in use and so it should now work correctly with CdC. please can you give this version a go?

ASCOM Remote Installerhttps://download.ascom-standards.org/beta/ASCOMRemote(1.6.7431.32351)setup.exe

Thanks, Peter

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ASCOMInitiative/ASCOMRemote/issues/14#issuecomment-624831050, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJNSQF6DFO4RGPMR2JUOF5DRQGXWRANCNFSM4M2RMLPQ.

Peter-Simpson commented 4 years ago

Hi Mike,

That's unexpected, to help me track this down, please can you:

Many thanks, Peter

Peter-Simpson commented 4 years ago

Hi Mike,

I've had another go at this and added some further protection; hopefully this version will work. Please let me know how you get on.

https://download.ascom-standards.org/beta/ASCOMRemote(1.6.7432.18168)setup.exe

Thanks, Peter

mikeread2018 commented 4 years ago

Thanks Peter,

I’ll give a test later this afternoon.

Sent from my iPhone Please excuse any predictive text and typos!

On 7 May 2020, at 10:09, Peter Simpson notifications@github.com wrote:



Hi Mike,

I've had another go at this and added some further protection; hopefully this version will work. Please let me know how you get on.

https://download.ascom-standards.org/beta/ASCOMRemote(1.6.7432.18168)setup.exe

Thanks, Peter

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ASCOMInitiative/ASCOMRemote/issues/14#issuecomment-625129971, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJNSQF4ISWRTTKKJUOKXSDTRQJ3EBANCNFSM4M2RMLPQ.

mikeread2018 commented 4 years ago

Hi Peter,

Thanks for this, that has worked. I can now get images from CCDCiel using the remote server.

I’ll continue to test and raise any other issues I find.

Once again, thank you for your swift response.

From: Peter Simpson notifications@github.com Sent: 07 May 2020 10:09 To: ASCOMInitiative/ASCOMRemote ASCOMRemote@noreply.github.com Cc: Mike Read mread@mike-read.co.uk; Author author@noreply.github.com Subject: Re: [ASCOMInitiative/ASCOMRemote] Chunked encoding upload is not supported on the HTTP/1.0 protocol. (#14)

Hi Mike,

I've had another go at this and added some further protection; hopefully this version will work. Please let me know how you get on.

https://download.ascom-standards.org/beta/ASCOMRemote(1.6.7432.18168)setup.exe

Thanks, Peter

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ASCOMInitiative/ASCOMRemote/issues/14#issuecomment-625129971, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJNSQF4ISWRTTKKJUOKXSDTRQJ3EBANCNFSM4M2RMLPQ.

Peter-Simpson commented 4 years ago

Hi Mike,

Excellent news, I'm glad that fixed the issue. It will help me understand what is going on with CdC's client if you can still send me a Remote Server log file with logging and debug logging enabled as described above.

Many thanks, Peter

Peter-Simpson commented 4 years ago

I'm closing this issue because it has been resolved.