Comments (6)
Run Caddy (I use 2.6.4 but shouldn't matter too much):
% caddy run
2023/05/30 11:35:27.475 INFO admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}
Speak to the API:
% clj
Clojure 1.11.1
user=> (require '[org.httpkit.client])
nil
user=> @(org.httpkit.client/get "http://localhost:2019/config/")
{:opts {:method :get, :url "http://localhost:2019/config/"}, :error #error {
:cause "Expected an empty line, but found Etag: \"/config/ 0e7c22ea\""
:via
[{:type org.httpkit.ProtocolException
:message "Expected an empty line, but found Etag: \"/config/ 0e7c22ea\""
:at [org.httpkit.client.Decoder readEmptyLine "Decoder.java" 144]}]
:trace
[[org.httpkit.client.Decoder readEmptyLine "Decoder.java" 144]
[org.httpkit.client.Decoder decode "Decoder.java" 112]
[org.httpkit.client.HttpClient doRead "HttpClient.java" 211]
[org.httpkit.client.HttpClient run "HttpClient.java" 487]
[java.lang.Thread run "Thread.java" 829]]}}
from http-kit.
@leahneukirchen Hi Leah, can you please share more about the code or context that you're referring to?
Is this issue related to http-kit server or client?
What exactly are you trying to do?
Thanks
from http-kit.
I use the http-kit client to talk to the Caddy configuration API, but it fails to parse the standards-compliant response because a Trailer: is sent with the last chunked part.
from http-kit.
I use the http-kit client to talk to the Caddy configuration API
Can you please provide an example? Something that can be easily reproduced would be ideal, thanks!
from http-kit.
Great, thanks for the clarification and report 👍
Sounds like a bug in the client decoder.
PR very welcome if you or someone else would be interested to take a look!
from http-kit.
Update: I took a quick stab at addressing this with 110b45e.
Looks straight-forward enough, but I'll keep this open for now in case anyone else is available to help review.
from http-kit.
Related Issues (20)
- http-kit doesn't get past fastly - "Requested host does not match any Subject Alternative Names (SANs)" HOT 3
- get to specific url returns empty body, while other clients don't HOT 1
- Handle closing connection by client HOT 2
- Fix regression: the new default SNI client doesn't support `:insecure?` req option HOT 2
- HttpServer#tryWrite HOT 1
- Outdated http.async.client fails to compile HOT 2
- 2.8.0 beta1 blows up size of babashka image HOT 1
- Capture number of processors at runtime in a graalvm binary HOT 2
- http-kit client accepts some bad SSL certificates by default HOT 2
- Issue preventing non-keep-alive benchmarks HOT 1
- Race condition in TimerService.scheduleTask HOT 2
- Ring websocket API support HOT 4
- Problem in native-image and HttpUtils when using virtual threads HOT 11
- 2.8.0-beta2 has CIDER dependencies HOT 3
- CURL and finagle failing to parse :set-cookies with '\n' HOT 13
- Unix socket benchmark HOT 1
- It will turn headers into camel format HOT 2
- logger-warn gets rebound HOT 1
- logger-warn and error-warn are passed in wrong order to HttpServer constructor HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from http-kit.