apache / apache/trafficserver

POST without payload hangs if Content-Length: 0 is not set

Open
#6,262 6 comments 0 reactions 1 assignee Claimed by @bryancall View on GitHub
Bug HTTP
Dominant language
C++
Stars
2k
Forks
874
Avg merge
6d 15h
Merged PRs (30d)
46

Description

Forward proxy mode. With disabled check for `Content-Length`:

`CONFIG proxy.config.http.post.check.content_length.enabled INT 0`

The following works:
```
curl -v -x localhost:3128 -X POST -H 'Content-Length: 0' http://example.com
```

The following doesn't, it hangs for a while and then returns `HTTP/1.1 408 Inactive Timeout`:
```
curl -v -x localhost:3128 -X POST http://example.com
```

The same POST without payload works with `squid` for example or when making direct requests to the web-server.

I found this:

https://issues.apache.org/jira/browse/TS-2902

but it doesn't tell much about supporting POST without payload and without `Content-Length`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.