[gopher] Correct error handling

Kim Holviala kim at holviala.com
Fri May 11 11:13:03 UTC 2012


On Thu, 10 May 2012, 06:01:25 EEST, Driedfruit <driedfruit at mindloop.net> wrote:

> It seems to me, that servers either return errors via gopher menus,
> either as plain-text. Is that behavior correct?
> 
> gopher://floodgap.com/0/non-existant-path
> gopher://floodgap.com/1/non-existant-path
> 
> Plain-text files couldn't be parsed as gopher menus and vice versa, so
> in either case the resulting output is flawed. Yet the response for the
> 2 queries above is the same.
> 
> So what's the deal here?

The server doesn't know what filetype the client is requesting (it's not part of the request string). Gophernicus tries to guess, sometimes correctly, while most other servers won't even try (which really isn't any worse, just different).

Gopher errors are just broken, plain and simple.

- Kim





More information about the Gopher-Project mailing list