Comments (5)
from webzmachine.
Nice one :-) Some parts of webmachine desperately need a cleanup. This will make things more clear in this area.
Side note: There is a separate header for negotiating which transfer encoding to use. This is the TE
header. Browsers generally don't send this header. This means that in the normal case identity
and chunked
are allowed, not gzip
. Even if that is specified in the Accept-Encoding
header. The Accept-Encoding
header is restricted to specifying content encoding only. Proxies may add an TE header of course, but I don't think that is done in practice.
from webzmachine.
👍
from webzmachine.
The selected content-encoding/charset can be fetched with:
wrq:resp_content_encoding(ReqData).
wrq:resp_chosen_charset(ReqData).
There are some more new wrq functions:
resp_transfer_encoding/1, set_resp_transfer_encoding/2,
resp_content_encoding/1, set_resp_content_encoding/2,
resp_content_type/1, set_resp_content_type/2,
resp_chosen_charset/1, set_resp_chosen_charset/2,
See wrq.erl for more details.
Also added support for file:sendfile, and some new content return values, complete list is now:
iolist()
{device, IO}
{device, Length, IO}
{file, Filename}
{file Length, Filename}
{stream, StreamFun}
{stream, Size, StreamFun}
{writer, WriterFun}
from webzmachine.
That looks nice. I will place the same controller workflow inside the new elli + machine solution.
from webzmachine.
Related Issues (7)
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 webzmachine.