net::ERR_INCOMPLETE_CHUNKED_ENCODING

感情迁移 提交于 2020-01-14 07:15:01

问题


I use .htaccess to rewrite url from someurl.com/ to someurl.com/public/. First .htaccess in www root contains this:

DirectoryIndex ./public/
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.*)$ ./public/$1  [QSA]

and second one in folder /public/ contains this:

DirectoryIndex _main.php
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.*)$ ./?params=$1 [QSA]

And the problem is when I open url someurl.com/ without "public". Page is loaded correctly, but in Google Chrome console I got error: net::ERR_INCOMPLETE_CHUNKED_ENCODING. When I open url someurl.com/public/ page loads without any error.

Any ideas, please?


回答1:


In my case, the problem was cache-related and was happening when doing a CORS request.

I post my response here cause this is the first resource I found on Google for net::ERR_INCOMPLETE_CHUNKED_ENCODING error.

Forcing the response header Cache-Control to no-cache resolved my issue:

[ using Symfony HttpFoundation component ]

<?php
$response->headers->add(array(
   'Cache-Control' => 'no-cache'
));



回答2:


I had this issue when trying to access some parts of the WP admin area, I managed to resolve it by adding the below to my functions.php file;

add_filter('wp_headers', 'wpse167128_nocache');
function wpse167128_nocache($headers){
    unset($headers['Cache-Control']);
    return $headers;
}



回答3:


We had net::ERR_INCOMPLETE_CHUNKED_ENCODING problem in case of HTML, which contained too much empty lines. Some browsers had difficulties with interpretation of long files.

Once we made applied code cleaning in our templates by cleaning code from empty lines, all was perfect.




回答4:


I was also facing same issue. Finally i got this was the permission issue on cache folder.




回答5:


I decided changing the file : /etc/apache2/mods-enabled/cgid.conf
Adding the following code snippet:

<IfModule mod_cgid.c>
    CGIDScriptTimeout 60
</IfModule>



回答6:


This problem is really general, in my case I deactivated the WP Super Cache plugin, and didn't get the bug anymore, but this is so general that no one can really help you because of different configurations of servers/wordpress




回答7:


In my case, the problem was the Windows anti-virus software (Kaspersky). Turning it off, the problem was gone :/




回答8:


For me it was the Zend PHP Opcache. It had reached its memory limit and could no longer cache all scripts. This was a problem for a massive code base like Magento 2.

Increasing the memory limit solved the issue after weeks of banging head on desk.



来源:https://stackoverflow.com/questions/23217824/neterr-incomplete-chunked-encoding

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!