content-length problem #13

Closed
opened 2018-03-28 11:24:57 +02:00 by Showfom · 4 comments
Contributor

When I use Nginx, the content-length for download page is not the same as file size

So we can modify src/Gist/Controller/ViewController.php and change 'Content-Length' => filesize($file), to 'Content-Length' => strlen($viewOptions['raw_content']),

When I use Nginx, the content-length for download page is not the same as file size So we can modify `src/Gist/Controller/ViewController.php` and change `'Content-Length' => filesize($file),` to `'Content-Length' => strlen($viewOptions['raw_content']),`
Owner

strlen or mb_strlen? Did you try it?

`strlen` or `mb_strlen`? Did you try it?
Author
Contributor

I use strlen and it works fine on Nginx with php7.2-fpm

I use `strlen` and it works fine on Nginx with php7.2-fpm
Owner

Already fixed on dev-master: b74960ecd3

Already fixed on dev-master: https://gitnet.fr/deblan/gist/commit/b74960ecd342154de60881a0f00eaa6816012fdb
Owner
Released on v1.8.1: https://gitnet.fr/deblan/gist/src/v1.8.1
Sign in to join this conversation.
No labels
bug
evolution
security
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: deblan/gist#13
No description provided.