Comments (5)
@devinivy Thanks, maybe should note this in the readme.
I saw works great on its own or with other frameworks
from the readme, no specific implementation specifications are mentioned, so I use this to parse attachment
.
content is part of the hapi ecosystem and was designed to work seamlessly with the hapi web framework and its other components (but works great on its own or with other frameworks).
from content.
Line 75 in 18e1c55
Not support attachment
GitHub Octokit return attachment; filename=name-repo-a849a73.zip
, but @hapi/content can not parse it.
from content.
I realize it's not readily apparent, but disposition()
is designed specifically to parse multipart form data payloads, which requires the disposition type be form-data
. In the spec referenced above it notes:
Note: This document does not apply to Content-Disposition header
fields appearing in payload bodies transmitted over HTTP, such as
when using the media type "multipart/form-data" ([RFC2388]).
Here is where we use Content.disposition()
— it's in pez, hapi's multipart parser: https://github.com/hapijs/pez/blob/0cf5f3031a453e7db91610c070206342e89964b0/lib/index.js#L292
If we decide to parse out the disposition type and allow other types, we would have to treat this like a breaking change and ensure pez only allows form-data.
from content.
I can see how that could easily happen. Do you think if we changed its subtitle from "HTTP Content-* headers parsing" to "HTTP Content-* request headers parsing" that it would have signaled this better? If so, I would give a PR for that change a ✅.
from content.
I can see how that could easily happen. Do you think if we changed its subtitle from "HTTP Content-* headers parsing" to "HTTP Content-* request headers parsing" that it would have signaled this better? If so, I would give a PR for that change a ✅.
Yes, I think so.
Cause this package is not a full functional http Content-
parser.
from content.
Related Issues (19)
- Throw errors HOT 1
- "name" is required in disposition? HOT 3
- Commercial version of v3 branch HOT 1
- Change module namespace HOT 1
- Action required: Greenkeeper could not be activated 🚨 HOT 1
- Update deps HOT 1
- Only node 12
- Explicitly handle __proto__
- Block __proto__ name
- Backport #21, #22
- Backport #21, #22
- N/a
- Update deps HOT 1
- Add typings
- Throw directly from header processing HOT 1
- Skip processing parameters when content type is not multipart HOT 2
- Backport fix for hapi 16 HOT 2
- Remove engines HOT 1
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 content.