💾 Archived View for gemi.dev › gemini-mailing-list › 000846.gmi captured on 2023-11-04 at 13:09:06. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2023-12-28)

-=-=-=-=-=-=-

[tech]: looking for cgi help/documentation/faq or similar

mingmengtou@use.startmail.com <mingmengtou (a) use.startmail.com>

Hi, where might i find help/docs/faq on gemini cgi? For html i am using:
#!/bin/bash
echo "Content-type: text/html"
echo ""
[rest of script]

I have not found information for starting a cgi script output for gemini.
Thank you for any assistance.
Cheers
Neil

Link to individual message.

Omar Polo <op (a) omarpolo.com>


mingmengtou at use.startmail.com writes:

> Hi, where might i find help/docs/faq on gemini cgi? For html i am using:
> #!/bin/bash
> echo "Content-type: text/html"
> echo ""
> [rest of script]
>
> I have not found information for starting a cgi script output for gemini.
> Thank you for any assistance.
> Cheers
> Neil

There are some difference on how Gemini servers implements CGI.
Usually[0] they just execute your script with a bunch of environment
variable set, and expect you to handle the transaction.  For instance, a
simple "hello world"-tier script could be:

	#!/bin/sh
	printf "20 text/gemini\r\n"
	echo "# Hello Gemini"

but check the documentation of your server of choice (and also the
protocol specification.)

Cheers,

Omar Polo

[0]: At least with gmid, GLV-1.12556 and (to some extent) vger; don't
     know what other servers do.

Link to individual message.

mingmengtou@use.startmail.com <mingmengtou (a) use.startmail.com>

Omar,

Thank you for your help.

> There are some difference on how Gemini servers implements CGI.
> Usually[0] they just execute your script with a bunch of environment
> variable set, and expect you to handle the transaction.  For instance, a
> simple "hello world"-tier script could be:
> 
> 	#!/bin/sh
> 	printf "20 text/gemini\r\n"
> 	echo "# Hello Gemini"

I can see that this would work. 

> but check the documentation of your server of choice (and also the
> protocol specification.)
> Cheers, 
> Omar Polo

I didn't notice that agate was static only - but problem solved: know the 
format and to check server.

> [0]: At least with gmid, GLV-1.12556 and (to some extent) vger; don't
>      know what other servers do.

I'm probably going to go with GLV

Thanks Neil

Link to individual message.

---

Previous Thread: [Tech] (?) Let's update the website

Next Thread: [Tech] (?) Let's update the website + License