git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'skl85/hotfix-extautodetect'
[phorkie.git]
/
www
/
raw.php
diff --git
a/www/raw.php
b/www/raw.php
index 28f7c56ee6ca3475a68507e3de2e27ec422a48d7..8bda11e8fbaeb9b363bb726bf27239ad9de32eef 100644
(file)
--- a/
www/raw.php
+++ b/
www/raw.php
@@
-17,5
+17,10
@@
if ($mimetype === null) {
$mimetype = 'text/plain';
}
header('Content-Type: ' . $mimetype);
$mimetype = 'text/plain';
}
header('Content-Type: ' . $mimetype);
-readfile($file->getFullPath());
+if ($repo->hash === null) {
+ //IIRC readfile is not so memory-intensive for big files
+ readfile($file->getFullPath());
+} else {
+ echo $file->getContent();
+}
?>
?>