Re: EOF excption in HTTP 1.1 server interaction

2018-05-18 Thread Simon Roberts
Thanks for all of this Daniel. Yes I finally managed to build curl with http2.0 support, and I see the same thing. I hate when one wastes three days (and who knows what of all your time) on a bug in a tool one was only using as ancillary support because one thought it would be quick (though hopefu

Re: EOF excption in HTTP 1.1 server interaction

2018-05-18 Thread Daniel Fuchs
Hi Simon, In complement to my previous answer, please find some additional info to your questions: On 16/05/2018 17:24, Simon Roberts wrote: Notes, as a result of the discussion, I deliberately added code, at line 56 of server.js, to try to ensure that it's sending \r\n. You don't need to d

Re: EOF excption in HTTP 1.1 server interaction

2018-05-18 Thread Daniel Fuchs
Hi Simon, I have done some more investigation, and I believe the issue here is that the `express` server doesn't like the connection upgrade that our HTTP Client asks for. As a result instead of ignoring the upgrade and simply replying with HTTP/1.1 the server seems to close the connection just a

Re: EOF excption in HTTP 1.1 server interaction

2018-05-16 Thread Joakim Erdfelt
Your node server lies about its Content-Length. That's the #1 reason for your issues, lack of truth about the Content-Length. When you under-send (Content-Length longer then actual response body content), you get the java.io.EOFException: EOF reached while reading from your initial message. When

Re: EOF excption in HTTP 1.1 server interaction

2018-05-16 Thread Daniel Fuchs
Hi Simon, I don't want to speculate, but the line termination for headers are supposed to be \r\n (CRLF) and the headers should be terminated by a 'blank' line (containing only \r\n). If the server isn't sending any CRLF, then the client might still be trying to reach the end of the headers bloc

Re: EOF excption in HTTP 1.1 server interaction

2018-05-16 Thread Simon Roberts
OK, here goes. 1) install node 8.11 from here: https://nodejs.org/ this should consist (though I could be wrong for mac or windows!) of expanding the archive, and adding the contained 'bin' directory to your path. You should be able to execute the commands: node --version (note two minus-signs. Sh

Re: EOF excption in HTTP 1.1 server interaction

2018-05-16 Thread Simon Roberts
Thanks for investigating this, Chris. I will put together a trivial node server and instructions on how to set it up (it's delightfully simple) Should be much less than an hour, if I can give it my un-distracted attention... On Wed, May 16, 2018 at 8:58 AM Chris Hegarty wrote: > Bernd, > > > On

Re: EOF excption in HTTP 1.1 server interaction

2018-05-16 Thread Chris Hegarty
Bernd, > On 16 May 2018, at 00:43, Bernd Eckenfels wrote: > > ... > For the httpclient code, the following improvements are IMHO possible: > > • As you mentioned the EOF should contain the callsite and not be > transorted from a worker thread context. This can either be done by rethrwin

Re: EOF excption in HTTP 1.1 server interaction

2018-05-15 Thread Bernd Eckenfels
ush(); } } } } -- http://bernd.eckenfels.net Von: Simon Roberts Gesendet: Mittwoch, 16. Mai 2018 00:02 An: net-dev@openjdk.java.net Betreff: Re: EOF excption in HTTP 1.1 server interaction No, HTTP 2.0 is not supported by nodejs (... current LTS release, eight-dot-some

Re: EOF excption in HTTP 1.1 server interaction

2018-05-15 Thread Simon Roberts
> it’s 62 bytes. > > Gruss > Bernd > -- > http://bernd.eckenfels.net > -- > *From:* net-dev on behalf of Simon > Roberts > *Sent:* Tuesday, May 15, 2018 10:47:35 PM > *To:* net-dev@openjdk.java.net > *Subject:* Re: EOF excption in

Re: EOF excption in HTTP 1.1 server interaction

2018-05-15 Thread Bernd Eckenfels
t string without the EOLs. Gruss Bernd -- http://bernd.eckenfels.net From: net-dev mailto:net-dev-boun...@openjdk.java.net>> on behalf of Simon Roberts mailto:si...@dancingcloudservices.com>> Sent: Tuesday, May 15, 2018 8:44:08 PM To: net-dev@openjdk.java

Re: EOF excption in HTTP 1.1 server interaction

2018-05-15 Thread Simon Roberts
g without the EOLs. >> >> Gruss >> Bernd >> -- >> http://bernd.eckenfels.net >> -- >> *From:* net-dev on behalf of Simon >> Roberts >> *Sent:* Tuesday, May 15, 2018 8:44:08 PM >> *To:* net-dev@openjdk.java.ne

Re: EOF excption in HTTP 1.1 server interaction

2018-05-15 Thread Simon Roberts
russ > Bernd > -- > http://bernd.eckenfels.net > -- > *From:* net-dev on behalf of Simon > Roberts > *Sent:* Tuesday, May 15, 2018 8:44:08 PM > *To:* net-dev@openjdk.java.net > *Subject:* Re: EOF excption in HTTP 1.1 server interaction > > Th

Re: EOF excption in HTTP 1.1 server interaction

2018-05-15 Thread Simon Roberts
> includes. You should also use crlf for the end of http headers (Sample >> works only on Windows)ö >> >> Gruss >> Bernd >> >> Gruss >> Bernd >> -- >> http://bernd.eckenfels.net >> -- >> *From:* net-dev

Re: EOF excption in HTTP 1.1 server interaction

2018-05-15 Thread Simon Roberts
dows)ö > > Gruss > Bernd > > Gruss > Bernd > -- > http://bernd.eckenfels.net > -- > *From:* net-dev on behalf of Simon > Roberts > *Sent:* Tuesday, May 15, 2018 7:22:27 PM > *To:* net-dev@openjdk.java.net > *Subject:* EOF excption

EOF excption in HTTP 1.1 server interaction

2018-05-15 Thread Simon Roberts
(Added subject line, sorry, not sure how I missed that in the first place!) I can pretty much confirm this has nothing to do with content length. I wrote the code below to allow experimentation and even as it stands, which I believe has a correct content length, and a bunch of other stuff removed