4

I noticed that when serving images Nginx is sending images using both writev() when called from a browser such as Firefox, but uses sendfile() to send the image when wgetting the image. Any idea why its using both? I have ' sendfile on ; ' in the config. Can't find a good answer anywhere. Thanks!

1 Answers1

3

I found the answer, the reason it was using writev() when using a web browser was because the browser sent headers requesting gzip. I disabled gzip on the server and now images are sent using sendfile() to wget, curl, and browsers. Mission accomplished!


#gzip  on;
#gzip_comp_level 9;
#gzip_types *;