14

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?

Mathew Wolf
  • 366
  • 1
  • 4
  • 9
  • Yes, solutions is simple - just put _main.php in first .htaccess on first line, so it will be like this: DirectoryIndex ./public/_main.php – Mathew Wolf Jun 08 '14 at 23:28
  • 2
    This problem can happen for lots of reasons. I would try to restart apache before fiddling with your .htaccess or anything else – madebydavid Jul 10 '14 at 11:59
  • possible duplicate of [net::ERR\_INCOMPLETE\_CHUNKED\_ENCODING in Chrome only](http://stackoverflow.com/questions/22608564/neterr-incomplete-chunked-encoding-in-chrome-only) – gaitat Jun 17 '15 at 13:41

9 Answers9

9

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'
));
eightyfive
  • 4,601
  • 3
  • 35
  • 44
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;
}
Dan Norris
  • 413
  • 3
  • 15
1

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.

Fedir RYKHTIK
  • 9,844
  • 6
  • 58
  • 68
0

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

Vinay Shankar
  • 19
  • 1
  • 3
0

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

<IfModule mod_cgid.c>
    CGIDScriptTimeout 60
</IfModule>
benka
  • 4,732
  • 35
  • 47
  • 58
0

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

VladNeacsu
  • 1,268
  • 16
  • 33
0

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

Aurelio Jargas
  • 370
  • 3
  • 5
0

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.

Matt Mombrea
  • 6,793
  • 2
  • 20
  • 20
0

It is about server side problem. The user has running web service does not right access to web server cache folder.

  1. Make sure nginx user can write to /var/lib/nginx (or /var/cache/nginx in some distros).
  2. Make sure nginx user can write to the folder (find the nginx user form nginx configuration file is located usually in /etc/nginx/nginx.conf)
  3. Give the right access (chown -R nginx:nginx /var/lib/nginx/) Reload the service(-service nginx reload -in centos)
ganji
  • 752
  • 7
  • 17