Skip to content

Instantly share code, notes, and snippets.

@hcooper
Last active August 29, 2015 14:03
Show Gist options
  • Save hcooper/a1c7a882914679a0ccc9 to your computer and use it in GitHub Desktop.
Save hcooper/a1c7a882914679a0ccc9 to your computer and use it in GitHub Desktop.

Revisions

  1. hcooper renamed this gist Jul 14, 2014. 1 changed file with 0 additions and 0 deletions.
  2. hcooper created this gist Jul 14, 2014.
    25 changes: 25 additions & 0 deletions disable_Content-Length.diff
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    commit 74ae5fa6e841bbe1092cf6262fb6031b44fa9b4c
    Author: Hereward Cooper <[email protected]>
    Date: Mon Jul 14 14:46:17 2014 -0700

    disabling content-length header

    diff --git a/i.php b/i.php
    index a6c704e..52446b2 100755
    --- a/i.php
    +++ b/i.php
    @@ -416,7 +416,6 @@
    }

    header('Content-type: image/' . $ext);
    - header('Content-length: ' . filesize($file));
    header('Cache-Control: public');
    header('Expires: ' . gmdate('D, d M Y H:i:s', strtotime('+1 year')) . ' GMT');
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s', filemtime($file)) . ' GMT');
    @@ -426,4 +425,4 @@
    readfile($file);
    } else {
    die(file_get_contents($file));
    - }
    \ No newline at end of file
    + }