puppetlabs / puppetlabs/ring-middleware

net::ERR_INCOMPLETE_CHUNKED_ENCODING

Open
#55 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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:

  1. lein new luminus app +war
  2. use (wrap-proxy ...) around the app-routes to forward anything matching "/api" to a server that returns chunked-encoding responses
  3. lein uberwar to compile to a .war
  4. deploy to Tomcat
  5. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.