On Mon, May 24, 2010 at 2:38 AM, ravi krishna <ravi.9...@gmail.com> wrote:
> This is the error i get now > > InvalidURL at /index > > nonnumeric port: > > > Note httplib is part of base Python, not Django. Therefore you will likely find more expertise and help with using it on a Python list than here. (Further the error you are reporting getting is when you are trying to retrieve content from www.python.org; there will likely not be many on this list who can help with www.python.org responding oddly.) For what it is worth, the code you show works fine and retrieves what looks to be valid content when I try it: Python 2.5.2 (r252:60911, Jan 20 2010, 23:16:55) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import httplib >>> conn=httplib.HTTPConnection("www.python.org") >>> conn.request("GET", "/index.html") >>> r1 = conn.getresponse() >>> print r1.status, r1.reason 200 OK >>> data1 = r1.read() >>> len(data1) 17907 >>> data1[:200] '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">\n\n\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n\n<head>\n' >>> conn.close() >>> Karen -- http://tracey.org/kmt/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.