-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CHttpRequest.sendFile invalid Content-Length when output_handler is ob_gzhandler #4
Comments
This was referenced Feb 15, 2012
Closed
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The content length in header will be larger than the real size of the data
sent if gzip(or some other output buffer handler) is enabled.
In my opinion in this case the Content-Length part of the header should be
omitted.
So in CHttpRequest sendFile() method:
header('Content-Length: '.strlen($content));
should be replaced with:
if (strlen(ini_get("output_handler")) == 0)
header('Content-Length: '.strlen($content));
Migrated from http://code.google.com/p/yii/issues/detail?id=788
earlier comments
qiang.xue said, at 2010-01-05T02:05:46.000Z:
@sebastián: could you take a look at this? Please double check to make sure this IS an issue. Thanks.
qiang.xue said, at 2010-02-19T21:47:21.000Z:
This issue was closed by revision r1822.
The text was updated successfully, but these errors were encountered: