puppetlabs / puppetlabs/ring-middleware
net::ERR_INCOMPLETE_CHUNKED_ENCODING
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 11
- Forks
- 21
- Avg merge
- 18m
- Merged PRs (30d)
- 1
Description
Describe the Bug
I have a Luminus app using static ring-proxy to mediate between the browser and a back-end server, which works fine when running on its own, but I have used lein-uberwar to package it up and deploy it onto Tomcat, and there I see this error that a Content-Length header is set even though the response says it is chunked encoding, which the browser says contradicts itself and can't be processed. I looked though the http-opts, and nothing jumps out at me as a setting to change to avoid this. Any ideas?
Expected Behavior
The response from the servlet running in Tomcat has the chunked_encoding header, but not Content-Length
Steps to Reproduce
Steps to reproduce the behavior:
- lein new luminus app +war
- use (wrap-proxy ...) around the app-routes to forward anything matching "/api" to a server that returns chunked-encoding responses
- lein uberwar to compile to a .war
- deploy to Tomcat
- trigger AJAX calls from the browser to the URLs that are being proxied
Environment
- I'm actually using this through [derekchiang/ring-proxy "1.0.1"]
- Compiled on Ubuntu 20.10, run on Tomcat 9.0.44 on Windows 10
Additional Context
I hit the server from PostMan just to make sure it wasn't a problem with the browser or the ClojureScript app, but it also throws a parsing error.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with a new Luminus app using wrap-proxy, lein-uberwar, and Tomcat, then compare the proxied response headers with the standalone deployment. Verify that a chunked response no longer includes Content-Length and confirm the behavior with the browser or Postman.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure, java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100