Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5.1.1 LTS: Incomplete Chunked Encoding

I've seen lots of these reports, but none regarding the most recent laravel 5.1.1 (LTS). Have just started a new app, and I'm receiving the following error when requesting app.local/:

GET http://app.local/ net::ERR_INCOMPLETE_CHUNKED_ENCODING

It takes just over 5 seconds for it to come to this conclusion.

Now, this is essentially a fresh installation - I've only made the following changes:

  1. Use FallbackResource instead of mod_rewrite for sending the request to index.php, and
  2. Set the application path to /../name.application/bootstrap/autoload.php in index.php (moved app, config, etc to name.application directory.

I only get the above error when sending a request to the root of the domain - that is app.local/. There is an existing route for this, and it is set to return "Hello" (return response('Hello')). That response is displayed immediately, but the page continues to load for 5 seconds, and then the console throws that error.

If I request /test, the response is snappy, and I don't receive the error.

Seemingly, this is a Laravel problem, and I'm not quite sure where it comes from. It's not an .htaccess problem as reverting my changes makes no difference. Alternatively, it could be an Apache problem, but nothing points to that being the case.

For reference, I'm running Apache 2.4 with PHP 5.6 on Windows 8.1.

This issue isn't limited to Chrome like others have reported for previous versions.

Any guidance would be appreciated.

Update: Having tested on the same VirtualHost, Laravel 4.2 appears to be doing the same thing. Could this, in fact, be a server issue?

like image 316
Mike Rockétt Avatar asked Jun 13 '15 13:06

Mike Rockétt


1 Answers

After having looked at the answers here and realising that this is a bizarre issue, I tried falling back to the normal mod_rewrite approach, and it started working as expected.

Interestingly enough, this did not happen the first time, which is why the question was posted.

As such, this is more than likely a server issue. Running the app from a production server with the setup described in my question worked perfectly.

like image 73
Mike Rockétt Avatar answered Oct 18 '22 20:10

Mike Rockétt