Is it possible, SSL cert corrupt my downloaded files?

Hi everyone,

I have a problem since migrating my website on a new server. All my downloaded files such as XLSX, PNG or JPEG are corrupted why I get them.

All the site works like a charm, I don’t see any certificate problem but my question is : Is it possible the SSL certs or protocol breaks my files when I want to download them ?

Excel says format or extension is not valid.

When I get the files with SFTP, the file is ok but not with HTTPS ?

Apache2 problem maybe ?!

Thanks a lot by advance.

1 Like

Hi @udine1981

no, normally, that's not possible.

Your domain name and some samples are required to check that.

PS: Your server may send the wrong Mime Type:

application/octet-stream - unspecific or text/html - wrong.

New server, missing configuration.

1 Like

Hi, thanks for answer.

My domain name is : https://groupe-pole.com.

The files are storred in a private section named “Espace Adhérents” at the bottom of pages.

If you want to test, I have to create an account to connect. Maybe in PM ?!

I have to say PDF files are ok ! I don’t know why.

The header Content-Type is : application/octet-stream.

Annotation 2020-05-14 105705

I had move the website to an Apache server 2.4, NGINX before.

1 Like

That's

the wrong content type, so the result is expected. Check / update your Mime Type definitions.

1 Like

Thanks,

I tried to return to HTTP same result.
I tried to return to nginx same result. Working on the last server.
I tried to return to PHP5.6 same result. Working on the last server.

So I will try your suggestion, how can I do that and but why my mime type are broken ?!
I don’t understand how it’s happen ?! :anguished:

That’s really strange.

No result even I force the mime type of Excel File in the header.
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet for XLSX.

Same result, I’m really “lost”

1 Like

Create a test page on that site, add there some links.

May be you use a CMS that doesn’t work.

1 Like

Thanks a lot. Same result.
Thing I really don’t understand is that :

Left corrupted, right ok !

No SSL problem. But strange problem.

I’ll search on Joomla Forums and NGINX and Apache and Debian… And…

1 Like

Is this setting on or off:
EnableSendfile On

1 Like

Thanks for your help.

I tried to put it in apache2.conf at the end of file.
Restart Apache, same result.

I tried too in the website conf file. Same.

I found something strange in logs. This line :

[ssl:info] [pid 5721] (70014)End of file found: [client 78.242.101.116:54665] AH01991: SSL input filter read failed.

End of file ?! The file I want to download ? She’s appear since I click on the link.

1 Like

Turn off all compression (ZIP, GZIP, PKZIP)

1 Like

I have already tried.
So,

a2dismod deflate => Yes, do as I say!
systemctl restart apache2

Disable GZIP in website administration.

Same result!

I will have to reset all my install this weekend :anguished:

No compression in response headers when I click on the files link.
Annotation 2020-05-15 172701

I have to say, change manually Content-Type in the code of my website not working.

1 Like

As written: Please create a test page with a download link of an Excel-file.

May be it’s a problem of your client, not of your webserver.

1 Like

Are you using the default conf/mime.types file?
Have you overwritten any type?

1 Like

Hi everyone, today I try again lot of somethings. And it works !!! I'm so happy.

The problem was in my CMS.

File created by myself and uploaded on the left and file downloaded just after on the right:
Test

A line feed appears at the begining and it deleted the last letter... Why?!

So in my case, I added this line into my php file (before all http headers) in the CMS :

while(@ob_end_clean());

And it works now. Solution found in this post : PDF header problem - Joomla! Forum - community, help and support

Thanks a lot to all!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.