gopher
gopher copied to clipboard
Feature: once and done
- 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
- Exposing a setting for configuring the gopher document root. To use pass
-root <path>
when launching - Changing port to a number to enforce more accurate values are used
- Adding a script to document things, sample content, a wrapper CGI script.
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.
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.