Exemplo n.º 1
0
 def gopher_open(self, req):
     host = req.get_host()
     if not host:
         raise GopherError('no host given')
     host = unquote(host)
     selector = req.get_selector()
     type, selector = splitgophertype(selector)
     selector, query = splitquery(selector)
     selector = unquote(selector)
     if query:
         query = unquote(query)
         fp = gopherlib.send_query(selector, query, host)
     else:
         fp = gopherlib.send_selector(selector, host)
     return addinfourl(fp, noheaders(), req.get_full_url())
Exemplo n.º 2
0
 def gopher_open(self, req):
     host = req.get_host()
     if not host:
         raise GopherError("no host given")
     host = unquote(host)
     selector = req.get_selector()
     type, selector = splitgophertype(selector)
     selector, query = splitquery(selector)
     selector = unquote(selector)
     if query:
         query = unquote(query)
         fp = gopherlib.send_query(selector, query, host)
     else:
         fp = gopherlib.send_selector(selector, host)
     return addinfourl(fp, noheaders(), req.get_full_url())
Exemplo n.º 3
0
 def gopher_open(self, req):
     # XXX can raise socket.error
     import gopherlib  # this raises DeprecationWarning in 2.5
     host = req.get_host()
     if not host:
         raise GopherError('no host given')
     host = unquote(host)
     selector = req.get_selector()
     type, selector = splitgophertype(selector)
     selector, query = splitquery(selector)
     selector = unquote(selector)
     if query:
         query = unquote(query)
         fp = gopherlib.send_query(selector, query, host)
     else:
         fp = gopherlib.send_selector(selector, host)
     return addinfourl(fp, noheaders(), req.get_full_url())
Exemplo n.º 4
0
 def gopher_open(self, req):
     # XXX can raise socket.error
     import gopherlib  # this raises DeprecationWarning in 2.5
     host = req.get_host()
     if not host:
         raise GopherError('no host given')
     host = unquote(host)
     selector = req.get_selector()
     type, selector = splitgophertype(selector)
     selector, query = splitquery(selector)
     selector = unquote(selector)
     if query:
         query = unquote(query)
         fp = gopherlib.send_query(selector, query, host)
     else:
         fp = gopherlib.send_selector(selector, host)
     return addinfourl(fp, noheaders(), req.get_full_url())
Exemplo n.º 5
0
"""An extensible library for opening URLs using a variety of protocols
Exemplo n.º 6
0
"""An extensible library for opening URLs using a variety of protocols