Comments (4)
and thank you so much for maintaining and constantly improving this great project. Your efforts are deeply appreciated! , infact i'd like to help with sponsership
from hyper-express.
Hi, the Request.raw
property was removed because it was very unstable and hyper-express
could not guarantee that the Request.raw
would not throw a uWS forbidden access exception. However, I will add it back with more documentation and warning that this property should not be used in production and If it is, should be used through a synchronous middelware that is bounded as soon as possible to reduce the chances of a uWS forbidden access exception.
With that said, Request.raw
has been added back in version 6.7.1
be sure to upgrade to be able to access it again.
from hyper-express.
Also, If you don't mind, could you provide your code snippet of how you are using the raw property? I just wanna make sure It isn't something hyper-express can add to prevent you from having to drop down to the raw property.
from hyper-express.
here is the code being used as static file server ..
import { createBrotliCompress, createGzip, createDeflate } from 'zlib';
import {HttpRequest, HttpResponse} from "uWebSockets.js";
export function sendFile(res: Response, req: Request, path: string) {
const s = res.raw as HttpResponse
const q = req.raw as HttpRequest
sendFileToRes(
s,
{
'if-modified-since': q.getHeader('if-modified-since'),
range: q.getHeader('range'),
'accept-encoding': q.getHeader('accept-encoding')
},
path
);
}```
// on webserver.get sync callback i return sendFile
from hyper-express.
Related Issues (20)
- Type issue after latest version HOT 1
- Response send vs json HOT 8
- `res.cookie` is incompatible with express HOT 1
- A build error appeared with version 6.14.2 with TypeScript types definition HOT 1
- How to use `compression`? HOT 6
- Can't handle error in global error handler
- Default Encoding problems with accents HOT 1
- HI kartik, I'm sorry for the stupid question, but I need to learn how to work with this by example, can you show me?) HOT 3
- Handling multiple multipart HOT 7
- Question: Is there support for HTTP3 / QUIC ? HOT 1
- Feature request: swagger HOT 1
- No error thrown if invalid json is sent as body HOT 4
- From version 6.0.0, the response component doesn´t call a close or abort event when the SSE client is closed HOT 1
- Nest-hyper-express-adapter middleware tests failing HOT 4
- Nest-hyper-express instance and local-pipes tests each fail one test HOT 3
- Outdated example of static serving / LiveDirectory HOT 1
- Error: uWS.HttpResponse must not be accessed after uWS.HttpResponse.onAborted callback HOT 1
- Graceful shutdown HOT 4
- Static serving HOT 1
- No error on binding to the same port 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 hyper-express.