Re: [users@httpd] result codes from Bash CGI

2021-02-19 Thread Claude Warren
Doh!  PBKAS!  I originally coded with the wrong header.  Thanks for the
clarification and patience.

Claude

On Thu, Feb 18, 2021 at 10:18 PM Dino Ciuffetti  wrote:

> I see that they are easy to use and understand, but I could not find any
> reference to them in the documentation. The fact that Bash can be used as a
> CGI language is in the documentation, but nothing on the helper functions
> -- not even that they exist.
>
>
> May be you'll not find how to write something in Bash or a CGI script to
> the apache httpd manual. There are no helper functions.
> I'll try with this one, even simpler, only with the use of the "printf"
> bash shell builtin command and some comments.
> HTH
>
> https://gist.github.com/dam2k/de1e5a4335f21cca57e8cae980009778
>
>

-- 
I like: Like Like - The likeliest place on the web

LinkedIn: http://www.linkedin.com/in/claudewarren


Re: [users@httpd] result codes from Bash CGI

2021-02-18 Thread Claude Warren
I see that they are easy to use and understand, but I could not find any
reference to them in the documentation.  The fact that Bash can be used as
a CGI language is in the documentation, but nothing on the helper functions
-- not even that they exist.

Claude

On Thu, Feb 18, 2021 at 6:05 PM Dino Ciuffetti  wrote:

> Is there documentation for any of these methods? If you can point me to
> the proper section of the code base I can probably figure it out and
> document if necessary.
> Claude
>
>
> The code is super simple, does not require any dependency and is auto
> explicative.
> You are not calling any method.
> There are 4 functions that are implemented at the beginning of the script: 
> sendcontentheader()
> and sendstatuscode() send only a single header to stdout, endheaders() send
> newline character to end the response headers and begin the body section,
> sendbody() write some html to stdout.
>
> The function that sends the HTTP Status code header is sendstatuscode().
>
> Also, try to directly exec the script from command line to get the
> output, that is:
>
> dino@a1:/tmp# chmod 755 test.cgi
> dino@a1:/tmp# ./test.cgi
> Content-Type: text/html
> Status: 410 Gone
>
> 
> HI!Hi there, this is test.cgi
> speaking.HTTP Status code: 410 Gone
> 
>
>
>
>

-- 
I like: Like Like - The likeliest place on the web

LinkedIn: http://www.linkedin.com/in/claudewarren


Re: [users@httpd] result codes from Bash CGI

2021-02-17 Thread Claude Warren
Is there documentation for any of these methods?  If you can point me to
the proper section of the code base I can probably figure it out and
document if necessary.

Claude

On Mon, Feb 15, 2021 at 11:59 PM Dino Ciuffetti  wrote:

> So I would do something like
> echo "Status: 410 Gone"
> to create a "410 Gone" result code and message?
> Claude
>
> Yes. You got the point.
> Please check this CGI bash script I made for you as an example:
> https://gist.github.com/dam2k/5df0d8d3fdabc41e8ce2c799734f65d4
>


-- 
I like: Like Like - The likeliest place on the web

LinkedIn: http://www.linkedin.com/in/claudewarren


Re: [users@httpd] result codes from Bash CGI

2021-02-15 Thread Claude Warren
So I would do something like

echo "Status: 410 Gone"

to create a "410 Gone" result code and message?

Claude

On Mon, Feb 15, 2021 at 6:37 PM Eric Covener  wrote:

> There is a pseudo header you can emit from your CGI called Status that
> allows you to change the HTTP status code.
> You can set it just like you'd set e.g. Content-Type
>
> On Mon, Feb 15, 2021 at 11:37 AM Claude Warren  wrote:
> >
> > Greetings,
> >
> > I am playing with Bash based CGI.  It works reasonably well.  I know
> that it is not blindingly fast, but I think it will be sufficient for what
> I want to do if I can solve one problem.  I can see how to generate any
> result code other than 200.
> >
> > Is there a way to set the result code to anything else?  If so how?  Is
> there documentation?
> >
> > Thank you,
> > Claude
> >
> > --
> > I like: Like Like - The likeliest place on the web
> > LinkedIn: http://www.linkedin.com/in/claudewarren
>
>
>
> --
> Eric Covener
> cove...@gmail.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren


[users@httpd] result codes from Bash CGI

2021-02-15 Thread Claude Warren
Greetings,

I am playing with Bash based CGI.  It works reasonably well.  I know that
it is not blindingly fast, but I think it will be sufficient for what I
want to do if I can solve one problem.  I can see how to generate any
result code other than 200.

Is there a way to set the result code to anything else?  If so how?  Is
there documentation?

Thank you,
Claude

-- 
I like: Like Like - The likeliest place on the web

LinkedIn: http://www.linkedin.com/in/claudewarren