你應該打印出路徑來找出FF正在請求的內容。我很確定它是多次請求的favicon.ico(重試機制),因爲Snoop示例發送的格式無效。
編輯。我驗證了它,它的確是被請求三次圖標:
Thread[New I/O server worker #1-3,5,main] - [id: 0x57c52e72, /0:0:0:0:0:0:0:1:63056 => /0:0:0:0:0:0:0:1:8080] RECEIVED: DefaultHttpRequest(chunked: false) GET/HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip, deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Connection: keep-alive
Thread[New I/O server worker #1-3,5,main] - GET
Thread[New I/O server worker #1-3,5,main] -/
Thread[New I/O server worker #1-3,5,main] - [id: 0x57c52e72, /0:0:0:0:0:0:0:1:63056 => /0:0:0:0:0:0:0:1:8080] RECEIVED: DefaultHttpRequest(chunked: false) GET /favicon.ico HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0 Accept: image/png,image/*;q=0.8,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip, deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Connection: keep-alive
Thread[New I/O server worker #1-3,5,main] - GET
Thread[New I/O server worker #1-3,5,main] - /favicon.ico
Thread[New I/O server worker #1-3,5,main] - [id: 0x57c52e72, /0:0:0:0:0:0:0:1:63056 => /0:0:0:0:0:0:0:1:8080] RECEIVED: DefaultHttpRequest(chunked: false) GET /favicon.ico HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip, deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Connection: keep-alive
Thread[New I/O server worker #1-3,5,main] - GET
Thread[New I/O server worker #1-3,5,main] - /favicon.ico
Thread[New I/O server worker #1-3,5,main] - [id: 0x57c52e72, /0:0:0:0:0:0:0:1:63056 => /0:0:0:0:0:0:0:1:8080] RECEIVED: DefaultHttpRequest(chunked: false) GET /favicon.ico HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip, deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Connection: keep-alive
Thread[New I/O server worker #1-3,5,main] - GET
Thread[New I/O server worker #1-3,5,main] - /favicon.ico
我覺得這是在FF的一個錯誤,因爲FF請求與接受,hreader設置爲圖標的text/html,是application/xhtml + xml,application/xml在最後兩個請求中。有人有更多的信息嗎? –
謝謝 - 將會驗證並更新結果。 –
Japer - 確認;奇怪的確,FF爲favicon要求3次,Chrome和IE對單個favicon請求感到滿意:)。 –