gopher icon indicating copy to clipboard operation
gopher copied to clipboard

Feature: once and done

Open jceaser opened this issue 6 months ago • 2 comments

  1. Adding a way to make one request and return the response to the console so that the tool can be used as a CGI handler on simple web hosting shell accounts. To use pass a request to the flag -once like this: -once /README.md
  2. Exposing a setting for configuring the gopher document root. To use pass -root <path> when launching
  3. Changing port to a number to enforce more accurate values are used
  4. Adding a script to document things, sample content, a wrapper CGI script.

jceaser avatar Feb 04 '24 20:02 jceaser

An example of this work can be seen at http://thomascherry.name/cgi-bin/gwrap.cgi?/. My web service does not let me host anything on port 70, so I'm stuck on the web. Not knowing much, this is my attempt to get your app to run as a web application, but returning gopher content. Bombadillo will not handle it as of yet, but I have been playing with its code as well. I may just write a new client which makes HTTP calls but expects gopher content. Any ideas are welcome.

These changes should be pretty independent of my global plans to create a gopher server on the web. It's just nice for testing to be able to call one request and get a response, so I hope you find it helpful.

jceaser avatar Feb 04 '24 20:02 jceaser

Thank you for opening the PR, I've left a few comments as I'm a bit reluctant to bring in all of the changes.

peterhellberg avatar Feb 05 '24 13:02 peterhellberg