Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
I get this in console, when open securefile image url directly in a new tab.
GET http://website.com/couch/download.php?a ... 96a9f57c21 net::ERR_CONTENT_LENGTH_MISMATCH

Page opens, picture is already displayed, but the page keeps loading (up to 10-12 seconds) and then spills out the above in console. Used clean browser to check. What's that?
This error would suggest that the size of the file as reported in HTTP response header does not match the actual size of the file.

Does it happen on any particular file? Also are you testing on a local stack? Try rebooting the server and see if it helps.

Please PM me the access creds (FTP+Couch) to the problem site and I'll take a look at the issue, if you wish.

Thanks.
Seems to be a localhost issue.

I prepared a clean setup and it didn't work normally on localhost.

On the live server everything worked fine.

I will monitor this and hope to find what's causing this someday.

Thanks for getting back, appreciate that.
I found that trouble starts when cms:cloak_url is used on securefile images without undocumented parameter thumbnail='1'. Once I introduced it, problems are gone and page loads normally.
General update to this thread. Will show how to really solve this.

Using 'thumbnail'='1' is not a good solution, of course. Sometimes we need images, sometimes we need thumbs.

I spent over 6 hours today, examining all the relevant couch native code. I really had this trouble SO annoying and you'll agree with me if experiences the same. I have found another very old thread about this, but the problem is very randomly showing itself, so I must be lucky.

My troubles included: page loads for 10 sec, image disappears, couldn't download image, concole errors, erroneous file sizes while downloading etc.

So, it appears to root itself in the way localhost systems on *windows* report size of file. Of course, maybe some other thing influenced this, but proper size of file solves everything.

Finally, the solution is editing couc/download.php to get file's size from disk always.
5 posts Page 1 of 1
cron