Re: Partial output from cgi script

Martin Johnson <[email protected]> Fri, 25 Feb 2005 23:38:15 +0000
Newsgroups gmane.network.mathopd
Message-ID <[email protected]>
On Sat, 2005-02-26 at 00:55 +0200, Alex'a X Spirit wrote:
> Mathopd/1.5p4
> FreeBSD 4.9
> 
> Suppose I have a script:
> 
> 	#!/bin/sh
> 	printf "Content-type: text/plain\n\n"
> 	echo "`man -k more`"
> 
> If I run it from command line it puts on my machine:
> 
> 	Content-type: text/plain
> 
> 	isdnphone(8)             - telephone dialing and more for isdn4bsd
> 	less(1)                  - opposite of more
> 	ypmatch(1)               - print the values of one or more keys in a 
> 	zmore(1)                 - file perusal filter for crt viewing of com
> 	destroy(n)               - Destroy one or more windows
> 	foreach(n)               - Iterate over all elements in one or more lists
> 	lrange(n)                - Return one or more adjacent elements from a list
> 	replace(1)               - A utility program that is used by msql2mys
> 	XmAddToPostFromList(3)   - a RowColumn function that makes a menu accessi
> 
> But, if such script executes in browser I have (without any errors in
> all logs):
> 
> 	isdnphone(8)             - telephone dialing and more for isdn4bsd
> 	less(1)                  - opposite of more
> 	ypmatch(1)               - print the values of one or more keys in a
> 	zmore(1)                 - file perusal filter for crt viewing of com
> 
> Where is the last 5 lines?? Why mathopd cuts cgi output?

Have you tried tweaking ScriptBufSize in mathopd.conf ?

But, as a better solution, I guess it must also be possible somehow to
send arbitrarily-long CGI script output through Mathopd, in the style of
NCSA httpd's "non-parsed-header" CGI interface. For NCSA http you just
had to name your CGI script "nph-xxxx" but I don't know whether mathopd
does anything like that.