Comments (8)
I believe Jetty does follow that. We make every effort to not use close delimitation. But in this case the client is asking for it and we are bound to follow that.
from jetty.project.
Checking the updated RFCs ...
in RFC9110 ...
https://datatracker.ietf.org/doc/html/rfc9110#section-6.1
A message is considered "complete" when all of the octets indicated by its framing are available. Note that, when no explicit framing is used, a response message that is ended by the underlying connection's close is considered complete even though it might be indistinguishable from an incomplete response, unless a transport- level error indicates that it is not complete.
And in RFC9112 ...
https://datatracker.ietf.org/doc/html/rfc9112#name-message-body-length
Since there is no way to distinguish a successfully completed, close-delimited response message from a partially received message interrupted by network failure, a server SHOULD generate encoding or length-delimited messages whenever possible. The close-delimiting feature exists primarily for backwards compatibility with HTTP/1.0.
from jetty.project.
See https://datatracker.ietf.org/doc/html/rfc9112#name-tear-down, that shows that HTTP/1.1 still supports the connection:close semantic.
Now potentially we could also set a content-length as well as closing.
from jetty.project.
@gregw there's a reported demo project that can replicate this in Jetty 12 - https://github.com/techsup69/jetty-cont-len-12
from jetty.project.
See stackoverflow question for curl command line to trigger it - https://stackoverflow.com/questions/77822470/jetty-12-spring-6-missing-content-length-in-response
from jetty.project.
Hmmmm we do put the content length in even in the case of an EOF message... I'll respond in stackoverflow with some questions
from jetty.project.
Perhaps in the case of a forced Connection:close
for HTTP/1.1 where the content-length is not known, then we could use chunking and connection:close. Feels like optimizing the slow/bad case.
from jetty.project.
Perhaps in the case of a forced
Connection:close
for HTTP/1.1 where the content-length is not known, then we could use chunking and connection:close. Feels like optimizing the slow/bad case.
I see the point of view of the users and the spec here. That the close-delimited response message IS the bad to horrible case for HTTP/1.1 use.
As the current HTTP/1.1 specs point out this close-delimited response message behavior is only for backward compatibility with HTTP/1.0, and its use in HTTP/1.1 discouraged in use as it is indistinguishable from a partially received response message that is interrupted by a network failure. The current specs use "SHOULD generate encoding or length-delimited messages whenever possible" as guidance.
from jetty.project.
Related Issues (20)
- Broken HTTP/3 tests
- PUT request over plain text connection with chunk encoded body fails when upgrading to HTTP/2 HOT 1
- Get :authority field when using Websockets over http/2 with the jakarta websocket-api HOT 4
- Jetty Releases 12.0.8 HOT 3
- Why is HttpResponse.getReason() always null? HOT 2
- UTF-8 NFC/NFD tests fail on Macos HOT 3
- Client sending RST_STREAM led to exceeding maxEventsPerSecond(128) threshold HOT 4
- Sharing threads between HttpClient instances HOT 1
- Document Request Customizers
- IllegalStateException in IteratingCallback.iterate during async request when client has died HOT 2
- Connections maxing out for requests HOT 8
- Breaking change in class DosFilter from 9.4.53 to 9.4.54 HOT 7
- java.lang.NullPointerException: Cannot invoke "org.eclipse.jetty.io.ArrayByteBufferPool$Buffer.acquire()" because "buffer" is null HOT 1
- WebSocket sendBlocking timeout = -1 Does that make sense? HOT 3
- Jetty 12.0.6 upgrade issue: org.eclipse.jetty.client request.header("KEY", "VALUE") not available HOT 5
- Jetty Releases 9.4.x, 10.0.y, 11.0.y
- Reopening #11431: NPE in error handling leading to 100% CPU also in 12.0.7 HOT 1
- Jetty temp directory used while resolving spring config HOT 2
- Jetty12.0.8 cannot run my war successfully, but jetty-9.4.48.v20220622 can. HOT 1
- Socks5Proxy does not support IP addresses with IP segments above 127
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jetty.project.