tuaris opened a new issue, #12826:
URL: https://github.com/apache/trafficserver/issues/12826

   I am running a request chain where **Apache Traffic Server (ATS) 9.2.5** 
acts as a pure, non-caching reverse proxy:
   **User** $\rightarrow$ **Varnish 7.7.3** $\rightarrow$ **HAProxy 3.2.5** 
$\rightarrow$ **ATS 9.2.5** $\rightarrow$ **Apache (mod_php)** $\rightarrow$ 
**Backdrop CMS 1.27.0**
   
   I know that some of the items in that chain are redundant, but each one is 
there for a specific function/reason that I won't get into too much detail 
about.
   
   *   **ATS Configuration:** `proxy.config.http.cache.http` is set to `0` 
(Pure proxy mode).
   *   **Protocol:** ATS listens on port `1080:pp` (**Proxy Protocol v2**). 
HAProxy is configured with `send-proxy-v2`. The backend Apache server is also 
configured for Proxy Protocol.
   *   **The Problem:** Specifically during Backdrop CMS `update.php` database 
migrations (a `POST` request), ATS terminates the transaction with the 
following error:
       > `Description: Could not process this request because there was no 
Content-Length specified.`
   
   ### **Troubleshooting Taken**
   I have attempted to force content-length calculation at multiple layers to 
satisfy ATS's strictness:
   
   1.  **HAProxy (Inbound Fix):** I added `http-request wait-for-body time 5s` 
and `option http-buffer-request` to the backend to ensure HAProxy calculates 
and inserts a `Content-Length` header before forwarding the `POST` to ATS.
   2.  **Varnish (Front-End Fix):** I used `return(pass)` and `set 
beresp.do_stream = false` for the `update.php` URL to force response buffering 
and length calculation before the traffic hits the HAProxy/ATS segment.
   3.  **ATS Configuration:** 
       *   `proxy.config.http.chunking_enabled` is set to `3`. 
       *   `proxy.config.http.keep_alive_enabled_out` is set to `0`.
       *   **Note:** The variable 
`proxy.config.http.post.check_content_length_enabled` is unrecognized/removed 
in this version (9.2.5), so I cannot relax the inbound check via that legacy 
method.
   
   Even with buffering forced at HAProxy (request) and Varnish (front-end), ATS 
9.2.5 continues to reject the transaction. This issue does **not** occur when 
ATS is removed from the pipeline. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to