Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65100 - website/public_html/beta/common/code
From: dnljms_at_[hidden]
Date: 2010-08-29 07:07:04


Author: danieljames
Date: 2010-08-29 07:07:03 EDT (Sun, 29 Aug 2010)
New Revision: 65100
URL: http://svn.boost.org/trac/boost/changeset/65100

Log:
Only check that smaller files are redirects.
Text files modified:
   website/public_html/beta/common/code/boost_archive.php | 4 ++++
   1 files changed, 4 insertions(+), 0 deletions(-)

Modified: website/public_html/beta/common/code/boost_archive.php
==============================================================================
--- website/public_html/beta/common/code/boost_archive.php (original)
+++ website/public_html/beta/common/code/boost_archive.php 2010-08-29 07:07:03 EDT (Sun, 29 Aug 2010)
@@ -480,6 +480,10 @@
 
 function html_headers($content)
 {
+ // This function is expensive for large files, but large files are never
+ // redirects, so bail out quickly.
+ if(strlen($content) > 2000) return;
+
     if(preg_match(
         '@<meta\s+http-equiv\s*=\s*["\']?refresh["\']?\s+content\s*=\s*["\']0;\s*URL=([^"\']*)["\']\s*/?>@i',
         $content,


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk