[gopher] Re: pygopherd & ASK
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<>
> class EnhancedGopherProtocol(rfc1436.GopherProtocol):
> def renderobjinfo(self, entry):
> return entry.gettype() + \
> entry.getname() + "\t" + \
> entry.getselector() + "\t" + \
> entry.gethost(default =3D self.server.server_name) + "\t" =
+ \
> str(entry.getport(default =3D self.server.server_port)) + =
"\t" + \
> str(entry.getsize()) + "\t" + \
> entry.getmimetype() + "\t" + \
> entry.getencoding() + "\t" + \
> entry.getlanguage()
>=20
> That is, you take the RFC1436 standard gopher and tack on new fields at t=
he
> end for the file size, its MIME type, encoding, and language. Should be
> easy enough to parse and ignore as the case may be.
Personally, I think all non-RFC1436 fields should be delimited somehow, e.g=
.:
<RFC1436 fields>\tsize: 287\tmime: text/plain\tencoding: Latin-1\tlanguage:=
en\r\n
But I think I need to review the Gopher+ docs again.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gopher] Re: pygopherd & ASK,
Timm Murray <=
|
|