﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
23123	ms-files.php: 304 Not Modified includes Content-Length with filesize	v-media		"Here are the HTTP headers that are got from the server when you request an attached file from WP Network Installation site:

{{{
HTTP/1.1 304 Not Modified
Server: nginx/1.0.15
Date: Sat, 05 Jan 2013 00:53:20 GMT
Connection: keep-alive
X-Powered-By: PHP/5.4.10
Content-Length: 10107
Last-Modified: Mon, 31 Dec 2012 00:17:16 GMT
ETag: ""8aec64ba4498790802016f5316f1f2d9""
Expires: Mon, 07 Mar 2016 10:40:00 GMT
}}}

Content-Length line is incorrect and causes Firefox/Chrome (at least these browsers) to wait forever. The problem exists in ms-files.php in the following lines:

{{{

if ( false === strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) )
        header( 'Content-Length: ' . filesize( $file ) );
}}}


This header is always added disregarding the http-status.

The solution can be sending zero instead of filesize or just not sending this field.

Some more information on wrong Content-Length can be found in this Chromium discussion: http://code.google.com/p/chromium/issues/detail?id=79556

You can test it yourself using this link: http://demo.themewolf.com/egreen/files/2012/11/logo-egreen.png"	defect (bug)	closed	normal		Multisite	3.5	normal	duplicate		
