Skip to content

Content-Length not send in header response ?? #397

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

Closed
aboshhab12 opened this issue May 19, 2023 · 7 comments
Closed

Content-Length not send in header response ?? #397

aboshhab12 opened this issue May 19, 2023 · 7 comments

Comments

@aboshhab12
Copy link

Hello
when i use send($filename) Content-Length not send in header response, what should i do to get filesize ?
thanks

@mikehaertl
Copy link
Owner

@aboshhab12
Copy link
Author

aboshhab12 commented May 19, 2023 via email

@mikehaertl
Copy link
Owner

Then you need to do some debugging. See the line I linke above (L113 in File.php). It's the place where Content-Length is usually set. Try to find out, why this does not happen in your case.

@aboshhab12
Copy link
Author

Then you need to do some debugging. See the line I linke above (L113 in File.php). It's the place where Content-Length is usually set. Try to find out, why this does not happen in your case.

actually in $headers array i see Content-length but i cant found it in response header in browser

@mikehaertl
Copy link
Owner

Then it's probably filtered out in some other layer (Nginx, Load balancer, ...). I think some webservers also remove it if compression is enabled.

In any case it's something we can't fix here.

@aboshhab12
Copy link
Author

aboshhab12 commented May 19, 2023

Then it's probably filtered out in some other layer (Nginx, Load balancer, ...). I think some webservers also remove it if compression is enabled.

In any case it's something we can't fix here.

<Files "pdf.php"> SetEnv no-gzip 1 </Files>

i add this code to .htaccess and it's work fine now, thanks

@aboshhab12
Copy link
Author

but when disable compression, creation pdf file takes longer time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants