💾 Archived View for rawtext.club › ~sloum › geminilist › 005205.gmi captured on 2024-02-05 at 11:13:26. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
b10m menno+gemini.at.lists.orbitalfox.eu at b10m.net
Sat Feb 13 13:46:58 GMT 2021
- - - - - - - - - - - - - - - - - - -
On Sat, Feb 13, 2021 at 02:21:19PM +0100, Omar Polo wrote:
Miguel de Luis Espinosa <enteka at fastmail.com> writes:
OK, so, I've never done this kind of thing before, just PHP'd
websites or using sinatra (ruby) that would take care of the
"small details" for you.
So I tried this on a space I have on the ctrl-c.club tilde
``` #!/usr/bin/ruby
p "20 SUCCESS\n\r" # also tried puts
I don't know how ctrl-c.club works, what server they use etc. But
this (if it's not a copy-paste error) looks wrong. Instead of
"SUCCESS" you should put a media type there, like text/gemini.
Also, the \n and \r are in the wrong order, \r comes first. (puts
should add a \n by itself at the end, so `puts "20 text/gemini\r"`
should be enough).
Also note that `p` is used for debugging (IIRC; I don't know rubyoften). You probably want `print` (or `puts`, to add a newlineautomatically).
So either:
puts "20 text/gemini\r\n"
or:
print "20 text/gemini\r\n\n"
-- b10m