Comments (5)
https://www.rfc-editor.org/rfc/rfc9110#field.content-length
A server MAY send a Content-Length header field in a response to a HEAD request (Section 9.3.2); a server MUST NOT send Content-Length in such a response unless its field value equals the decimal number of octets that would have been sent in the content of a response if the same request had used the GET method.
A server MAY send a Content-Length header field in a 304 (Not Modified) response to a conditional GET request (Section 15.4.5); a server MUST NOT send Content-Length in such a response unless its field value equals the decimal number of octets that would have been sent in the content of a 200 (OK) response to the same request.
A server MUST NOT send a Content-Length header field in any response with a status code of 1xx (Informational) or 204 (No Content). A server MUST NOT send a Content-Length header field in any 2xx (Successful) response to a CONNECT request (Section 9.3.6).
But also, in agreement with this issue:
Aside from the cases defined above, in the absence of Transfer-Encoding, an origin server SHOULD send a Content-Length header field when the content size is known prior to sending the complete header section.
from spin.
@vdice that is correct but as the SDKs do not live within Spin anymore, this issue is not relevant here(?)
from spin.
One could imagine making this a tracking issue so that there is a central place that captures the issue for all SDKs instead of only independently tracking the issue across all SDKs.
from spin.
We should maybe only add it automatically when the known content length is non-zero; there are some cases when servers are supposed to not send it (notably 204 No Content).
from spin.
Based on the results from #2249 it seems like the action items here would be to add this feature to various Spin SDKs, correct?
from spin.
Related Issues (20)
- Spin 2.6 release HOT 11
- Spin apps are no longer allowed to set host headers with Wasmtime 21.0.1 HOT 6
- Enable mustache-inspired string templates for `key_value_stores` and others HOT 6
- Add version control support to `spin new` or spin CLI HOT 12
- Rust and Python traces with KV store are not showing all KV spans in the same trace
- Remove HTTP trigger `base` option
- Consider deprioritizing the environment variable provider HOT 6
- Add `spin up --trigger-type` flag
- Enable pushing components with `spin registry push` HOT 3
- `spin login` keeps asking for one-time code after authorizaton HOT 6
- `spin --tree` or `spin --list` providing a tree structure of available subcommands and flags in spin cli HOT 3
- hello-python not working HOT 12
- Added flexibility to Spin allowed outbound hosts
- inconsistencies when making outbound http requests HOT 1
- Custom trigger with other WASI worlds requires trait implementation for `spin_core::Data<T>` HOT 2
- Add an S3 key/value storage provider interface HOT 3
- SQLITE error after update from 2.5.1 to 2.6.0 HOT 3
- spin can not login docker private registry while docker login success HOT 5
- Follow OCI container image annotation standards when generating containers HOT 2
- Generate and sign SBOM through spin HOT 5
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 spin.