nokonoko / Pomf

Simple file uploading and sharing, source for the now shut down site Pomf.se
MIT License
463 stars 98 forks source link

Provide Content-Length HTTP header for .jpeg files #33

Open on-three opened 9 years ago

on-three commented 9 years ago

Don't know if it's typical or not but some stuff my peoples and i use don't quite work because of lack of content-length HTTP header in .jpeg urls. Reproducible via:

$ curl -X HEAD -i http://a.pomf.se/bphrxe.jpeg
HTTP/1.1 200 OK
Date: Thu, 21 May 2015 06:44:39 GMT
Content-Type: image/jpeg
Connection: keep-alive
Set-Cookie: __cfduid=d44a657cdeb2ca0519507e03710d5f0411432190679; expires=Fri, 20-May-16 06:44:39 GMT; path=/; domain=.pomf.se; HttpOnly
Last-Modified: Thu, 21 May 2015 00:17:26 GMT
Vary: Accept-Encoding
ETag: W/"555d2416-eddc"
Expires: Fri, 20 May 2016 06:44:39 GMT
Cache-Control: public, max-age=31536000
X-Frame-Options: DENY
CF-Cache-Status: HIT
Server: cloudflare-nginx
CF-RAY: 1e9e5060787f07f1-LAX

This is opposed to webms and other filetypes which do seem to provide them.