Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response header incompatibility between express and uWebSockets-express #39

Open
sys9kdr opened this issue Dec 25, 2024 · 0 comments
Open

Comments

@sys9kdr
Copy link

sys9kdr commented Dec 25, 2024

First of all, thank you for this wonderful software! I found an incompatibility issue related to response headers.

This might be out of scope given the express API compatibility goal, but worth documenting.

Express

import express from 'express'

const app = express()

app.get('/', (req, res) => {
  res.send('hello')
})

app.listen(3000)
HTTP/1.1 200 OK
X-Powered-By: Express
Content-Type: text/html; charset=utf-8
Content-Length: 5
ETag: W/"5-qvTGHdzF6KLavt4PO0gs2a6pQ00"
Date: Tue, 24 Dec 2024 12:48:51 GMT
Connection: keep-alive
Keep-Alive: timeout=5

uWebSockets-express

import uWS from "uWebSockets.js"
import expressify from "uwebsockets-express"

const uwsApp = uWS.App();
const app = expressify(uwsApp);

app.get('/', (req, res) => {
        res.send('hello')
})

app.listen(8000);
HTTP/1.1 200 OK
x-powered-by: Express
content-type: text/html
Date: Wed, 25 Dec 2024 12:10:39 GMT
uWebSockets: 20
Content-Length: 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant