Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-07 Thread Glen Peterson
Oh. I found the other file in org.eclipse.jetty:jetty-http:9.4.21.v20190926 that has the other line in it. I included the ServicesResourceTransformer (thank you Steven!) and it merged the two files for me. Perfect! Sounds like that was the root cause of my issue. I searched again, to see how

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-07 Thread Greg Wilkins
Glen, not it's not just the META-INF/services/org.eclipse.jetty.http.HttpFieldPreEncoder file I'm concerned with, but any META-INF/services/* file, with examples including: - com.sun.net.httpserver.spi.HttpServerProvider - javax.servlet.ServletContainerInitializer -

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-07 Thread Steven Schlansker
> On Oct 7, 2019, at 12:33 PM, Glen Peterson wrote: > ... > I'm using the Maven Shade plugin. What would you recommend as a better tool > to make a fat jar? I tried Gradle too, but went back to Maven specifically > because the Shade plugin had better debugging info than the Gradle Shadow >

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-07 Thread Glen Peterson
I only found the META-INF/services/org.eclipse.jetty.http.HttpFieldPreEncoder file in the org.eclipse.jetty.http2:http2-hpac:9.4.20.v20190813 jar file and it had just the one line in it: org.eclipse.jetty.http2.hpack.HpackFieldPreEncoder Same thing with version 9.4.21.v20190926. Should I be

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-04 Thread Greg Wilkins
A good tool to create a fat jar should merged META-INF service files for you. There are probably a couple of other ones that need to be merged in the code base... more so once you go to jetty 10. cheers On Sat, 5 Oct 2019 at 10:16, Glen Peterson wrote: > SWEET! That fixed it. I just added

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-04 Thread Glen Peterson
SWEET! That fixed it. I just added the line: org.eclipse.jetty.http2.hpack.HpackFieldPreEncoder And it worked! Hallelujah! Is that something I can configure with code? On Fri, Oct 4, 2019 at 8:12 PM Glen Peterson wrote: > Yes. It has a single line: >

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-04 Thread Glen Peterson
Yes. It has a single line: org.eclipse.jetty.http.Http1FieldPreEncoder Should it have 2 lines? What if I just disallow that file altogether? On Fri, Oct 4, 2019 at 8:10 PM Greg Wilkins wrote: > > Glen, > > it is not a matter of if the classes are in the jar or not. It is a > matter of if

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-04 Thread Greg Wilkins
Glen, it is not a matter of if the classes are in the jar or not. It is a matter of if the META-INF/services has been correctly configured to load them with the ServiceLoader. Does your jar have a META-INF/services/org.eclipse.jetty.http.HttpFieldPreEncoder file and if so, what is it's

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-04 Thread Glen Peterson
I may have been able to really simplify my example. Here's the entire main method that works when run from class files, and fails when run from the jar: val bb: ByteBuffer = ByteBuffer.allocate(100) PreEncodedHttpField("hello", "world").putTo(bb, HttpVersion.HTTP_1_0) logger.info("hello world

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-04 Thread Glen Peterson
It *works* with http1.1 (I will also look more at the fat-jar thing): $ curl --http1.1 --verbose --insecure https://localhost:8443 -D headers.txt * Rebuilt URL to: https://localhost:8443/ * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8443 (#0) * ALPN,

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-04 Thread Greg Wilkins
I'm guessing the problem is the way you make your fat jar you must not be correctly combining the META-INF/services/org.eclipse.jetty.http.HttpFieldPreEncoder files To run both http1 and http2, you need that file to exist in the jar and to contain: org.eclipse.jetty.http.Http1FieldPreEncoder

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-04 Thread Joakim Erdfelt
Interesting, I wonder if you are hitting the response headers issues with regards to HTTP/2. See: https://github.com/eclipse/jetty.project/issues/3956 and https://github.com/eclipse/jetty.project/issues/4115 Can you run curl again, but with HTTP/1.1? $ curl --http1.1 --verbose What kind

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-04 Thread Glen Peterson
I changed the logging configuration from INFO to DEBUG and found this error when Jetty tries to serve the request: Sending HeadersFrame@676f5d6c#1{end=false} Appended HeadersFrame@676f5d6c#1{end=false}, entries=1 Flushing HTTP2ServerSession@74a58163{l:/0:0:0:0:0:0:0:1:8443 <->

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-02 Thread Glen Peterson
Yes Joakim. I just made one and posted it here: https://github.com/GlenKPeterson/classVsJar On Wed, Oct 2, 2019 at 2:43 PM Joakim Erdfelt wrote: > Do you have a project that you can share that replicates this? > > Joakim Erdfelt / joa...@webtide.com > > > On Wed, Oct 2, 2019 at 1:16 PM Glen

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-02 Thread Joakim Erdfelt
Do you have a project that you can share that replicates this? Joakim Erdfelt / joa...@webtide.com On Wed, Oct 2, 2019 at 1:16 PM Glen Peterson wrote: > P.S. I was able to get some interesting output from wget2 (successor to > wget). It works fine running with the classes. With the jar

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-02 Thread Glen Peterson
P.S. I was able to get some interesting output from wget2 (successor to wget). It works fine running with the classes. With the jar file, I get the following which seems jetty-related: $ wget2 -d --no-check-certificate https://dev.memoryjoggerlibrary.com:8443/ 02.140606.876