https://github.com/ricardozanini/httpclient-status204-sample
A simple reproducer to observe of how HttpCommons 4.x handles HTTP 204 responses with a body
https://github.com/ricardozanini/httpclient-status204-sample
http-client jetty rfc tomcat
Last synced: about 2 months ago
JSON representation
A simple reproducer to observe of how HttpCommons 4.x handles HTTP 204 responses with a body
- Host: GitHub
- URL: https://github.com/ricardozanini/httpclient-status204-sample
- Owner: ricardozanini
- License: apache-2.0
- Created: 2018-06-12T17:49:28.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-17T16:54:06.000Z (8 months ago)
- Last Synced: 2025-03-25T14:05:37.330Z (3 months ago)
- Topics: http-client, jetty, rfc, tomcat
- Language: Java
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HttpCommons Status 204
A simple reproducer to observe how HttpCommons 4.x handles HTTP 204 responses with a body.
## Lab Results
For this lab, I implemented three different servers to observe their behavior with [RFC 7230 (HTTP/1.1)](https://tools.ietf.org/html/rfc7230#section-3.3.3) when returning a Http Status 204 with a body (breaking the RFC).
The motivation behind this lab was to observe the response parse by HttpCommons in such scenarios. The problem is, neither servers return a response body when setting a 204 http status:
- [`HttpCommonsNastyServer`](src/main/java/samples/httpclient/status204/HttpCommonsNastyServer.java)
- [`JetttyNastyServer`](src/main/java/samples/httpclient/status204/JetttyNastyServer.java)
- [`TomcatNastyServer`](src/main/java/samples/httpclient/status204/TomcatNastyServer.java)Still looking for a server which breaks the RFC.