igrishaev / ring-jdk-adapter

Zero-deps Ring server on top of jdk.httpserver
https://github.com/igrishaev/ring-jdk-adapter
The Unlicense
24 stars 0 forks source link

adding all keys listed in Ring spec #1

Closed yogthos closed 9 minutes ago

yogthos commented 2 hours ago

It looks like current implementation is missing some keys listed in the spec. For example, ring-headers middleware breaks because it gets a null pointer trying to parse the scheme in request-url.

igrishaev commented 2 hours ago

It looks like I'm missing the scheme key, let me take a look

igrishaev commented 1 hour ago

Could you please try it with the latest release?

;; lein
[com.github.igrishaev/ring-jdk-adapter "0.1.1"]

;; deps
com.github.igrishaev/ring-jdk-adapter {:mvn/version "0.1.1"}

At the moment, the scheme field is always :http because the adapter doesn't support HTTPS server. I think I can implement HTTPS a bit later.

I added some tests that involve functions from ring.util.request namespace, and fixed one more minor bug.

Can you please let me know if it works for you?

yogthos commented 22 minutes ago

Looks good on my end!

igrishaev commented 9 minutes ago

Great! Feel free to open new issues, if you find them.

yogthos commented 8 minutes ago

Sounds good, and thanks for the quick fix.