vercel / micro

Asynchronous HTTP microservices
MIT License
10.59k stars 459 forks source link

Automatically set Content-Length 0 if 204 status #387

Closed mfix22 closed 5 years ago

mfix22 commented 5 years ago

Automatically sets the Content-Length header for when sending 204's, since Safari expects it (as seen here: https://github.com/expressjs/cors/blob/master/lib/index.js#L176-L177).

If you don't want to support this, no worries — feel free to close 🙂

iamstarkov commented 5 years ago

looks good to me

iamstarkov commented 5 years ago

wut

iamstarkov commented 5 years ago

@mfix22 why?

mfix22 commented 5 years ago

@iamstarkov I'm actually not so sure this is actually necessary anymore.

  1. I think Safari no longer has this issue 2.Not certain the maintainers we need so pollute this package with edge cases
  2. I figured I could always reopen if necessary 🤷‍♂️

(i'll reopen)