HTTP Server Not Sending Complete File To WGET, Firefox. Connection reset by peer?

前端 未结 2 1429
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-26 17:03

I\'m writing an HTTP server, and am having trouble sending larger files. If I grab them with netcat, the output seems perfect. If I use a browser or wget, I only get the complet

2条回答
  •  执笔经年
    2021-01-26 17:34

    I don't know if it is necessary, but when I inspect the headers being sent by a simple website, there are quotes around the values:

    Accept-Ranges:"bytes"
    Cache-Control:"max-age=25920000"
    Connection:"Keep-Alive"
    Content-Length:"4777"
    Content-Type:"image/gif"
    Date:"Wed, 01 Jul 2015 17:55:52 GMT"
    Expires:"Tue, 26 Apr 2016 17:55:52 GMT"
    Keep-Alive:"timeout=30, max=100"
    Last-Modified:"Mon, 28 Apr 1997 01:25:47 GMT"
    Server:"Apache/1.3.28 (Unix) mod_gzip/1.3.19.1a mod_perl/1.28"
    

    Is it possible the content type is not correct?

提交回复
热议问题