Date: Tue, 7 Mar 2023 00:37:49 +0800 From: Zhenlei Huang <zlei@FreeBSD.org> To: Mori Hiroki <yamori813@yahoo.co.jp> Cc: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: post not work mini_httpd Message-ID: <7AC0E596-0417-45AC-8531-0B8A8AD2B92A@FreeBSD.org> In-Reply-To: <507818037.1743060.1677364160616.JavaMail.yahoo@mail.yahoo.co.jp> References: <507818037.1743060.1677364160616.JavaMail.yahoo.ref@mail.yahoo.co.jp> <507818037.1743060.1677364160616.JavaMail.yahoo@mail.yahoo.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi,
It seems mini_httpd is not in base. Is it in ports ?
If yes I think you should contact the author or maintainer for support.
> On Feb 26, 2023, at 6:29 AM, Mori Hiroki <yamori813@yahoo.co.jp> wrote:
>
> Hi
>
> I use mini_httpd on RT3050.
>
> I try this cgi.
>
> #!/bin/sh
>
> echo "Content-Type: text/html"
> echo ""
> echo "OK"
>
> if [ "${REQUEST_METHOD}" = "POST" ]; then
> echo `cat` > /tmp/xxx
> fi
>
> This cgi work on GET but not work on POST.
> Firefox say connection reset.
>
> I seem FreeBSD/amd64 is same.
>
> This is patch.
>
> --- mini_httpd.c.org 2018-10-27 04:47:50.000000000 +0900
> +++ mini_httpd.c 2023-02-26 07:25:15.504936000 +0900
> @@ -1842,7 +1842,8 @@
> /* Interposer process. */
> (void) close( p[0] );
> cgi_interpose_input( p[1] );
> - finish_request( 0 );
> +// finish_request( 0 );
> + exit ( 0 );
> }
> (void) close( p[1] );
> if ( p[0] != STDIN_FILENO )
>
> Work fine both.
>
> Regards..
>
> Hiroki Mori
>
>
Best regards,
Zhenlei
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7AC0E596-0417-45AC-8531-0B8A8AD2B92A>
