This code works fine in the simulator (i.e. GoogleAppEngineLauncher). I get 
an DNS error when run on the GAE server. How can I fix this?

#!/usr/bin/env python

import webapp2
from google.appengine.api import urlfetch

class MainHandler(webapp2.RequestHandler):
  
  def get(self):
    self.response.headers['Content-Type'] = 'text/html; 
charset=windows-1251'
    
    try:
      result = urlfetch.fetch("http://rutracker.org/";)
      self.response.write(result.content)
    except Exception as e:
      self.response.write(e)
    
app = webapp2.WSGIApplication([
    ('/.*', MainHandler)
], debug=True)



-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/5aac3bb1-0b68-4245-bbb1-95003a0f1b6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to