From 44074ae9343154c8510dd7ee929f1532525b7da7 Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Sat, 10 Oct 2009 04:19:20 +0000 Subject: [PATCH] limits, title --- index.cgi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.cgi b/index.cgi index 1ede621..1fdb8ad 100755 --- a/index.cgi +++ b/index.cgi @@ -30,8 +30,9 @@ function cut_file { st==2 {print \$0}; /$1--/ {st=0}; /^\\r$/ && st==1 {st=2}; - " | head -c -2 + " | head -c -2 | head -c $((128*1024)) # Remove trailing ^M's that come with CGI + # Limit size to 128K } # Print out a generic header @@ -66,7 +67,7 @@ function do_print { # has a real terminal, not that we also have to set # term=xterm-256color in vimrc HOME=/home/andy \ - screen -D -m ex -u vimrc \ + screen -D -m ex -Z -u vimrc \ '+2d|'$trim \ '+%s/ //g' \ '+TOhtml' \ @@ -107,6 +108,7 @@ header text/html cat - < + vpaste.net - Vim based pastebin