Lines Matching refs:http
85 >>> url = "http://example.com"
99 This should be preserved for backwards-compatibility. (In the HTTP case,
103 >>> url = "http://example.com"
133 >>> add("Some Realm", "http://example.com/", "joe", "password")
134 >>> add("Some Realm", "http://example.com/ni", "ni", "ni")
135 >>> add("c", "http://example.com/foo", "foo", "ni")
136 >>> add("c", "http://example.com/bar", "bar", "nini")
137 >>> add("b", "http://example.com/", "first", "blah")
138 >>> add("b", "http://example.com/", "second", "spam")
139 >>> add("a", "http://example.com", "1", "a")
140 >>> add("Some Realm", "http://c.example.com:3128", "3", "c")
146 >>> mgr.find_user_password("Some Realm", "http://example.com")
148 >>> mgr.find_user_password("Some Realm", "http://example.com/")
150 >>> mgr.find_user_password("Some Realm", "http://example.com/spam")
152 >>> mgr.find_user_password("Some Realm", "http://example.com/spam/spam")
154 >>> mgr.find_user_password("c", "http://example.com/foo")
156 >>> mgr.find_user_password("c", "http://example.com/bar")
162 ## >>> mgr.find_user_password("Some Realm", "http://example.com/ni")
167 >>> mgr.find_user_password("b", "http://example.com/")
172 >>> mgr.find_user_password("a", "http://example.com/")
174 >>> mgr.find_user_password("a", "http://a.example.com/")
183 >>> mgr.find_user_password("Some Realm", "http://c.example.com:3128")
202 >>> add("f", "http://g.example.com:80", "10", "j")
203 >>> add("g", "http://h.example.com", "11", "k")
212 >>> mgr.find_user_password("f", "http://g.example.com:100")
214 >>> mgr.find_user_password("f", "http://g.example.com:80")
216 >>> mgr.find_user_password("f", "http://g.example.com")
222 >>> mgr.find_user_password("g", "http://h.example.com:80")
228 >>> mgr.find_user_password("h", "http://i.example.com:80")
234 >>> mgr.find_user_password("i", "http://j.example.com")
236 >>> mgr.find_user_password("i", "http://j.example.com:80")
352 return Request("http://blah/")
360 return self.parent.error("http", args[0], res, code, "", {})
431 "http", req, MockFile(), self.code, name, msg)
500 req = Request("http://example.com/")
528 r = o.open("http://example.com/")
542 req = Request("http://example.com/")
552 # http errors are a special case
566 req = Request("http://example.com/")
588 req = Request("http://example.com/")
779 url = "http://example.com/"
784 http = MockHTTPClass()
785 r = h.do_open(http, req)
795 self.assertEqual(http.host, "example.com")
796 self.assertEqual(http.level, 0)
797 self.assertEqual(http.method, method)
798 self.assertEqual(http.selector, "/")
799 self.assertEqual(http.req_headers,
802 self.assertEqual(http.data, data)
805 http.raise_on_endheaders = True
806 self.assertRaises(urllib2.URLError, h.do_open, http, req)
811 req = Request("http://example.com/", data)
844 "http://example.com/foo/bar/baz.html",
845 "http://example.com//foo/bar/baz.html",
846 "http://example.com/foo//bar/baz.html",
847 "http://example.com/foo/bar//baz.html",
869 weird_url = 'http://www.python.org?getspam'
875 url_without_path = 'http://www.python.org'
885 url = "http://example.com/"
903 self.assertEqual(o.proto, "http") # o.error called
911 req = Request("http://example.com/")
922 from_url = "http://example.com/a.html"
923 to_url = "http://example.com/b.html"
976 redirect(h, req, "http://example.com/")
988 redirect(h, req, "http://example.com/%d" % count)
995 from_url = "http://example.com/a.html"
996 valid_schemes = ['http', 'https', 'ftp']
1023 interact_netscape(cj, "http://www.example.com/", "spam=eggs")
1024 hh = MockHTTPHandler(302, "Location: http://www.cracker.com/\r\n\r\n")
1029 o.open("http://www.example.com/")
1033 redirected_url = 'http://www.example.com/index.html#OK\r\n\r\n'
1038 fp = o.open('http://www.example.com')
1044 response1 = b"HTTP/1.1 302 Found\r\nLocation: ?query\r\n\r\n"
1052 conn.__class__.fakedata = b"HTTP/1.1 200 OK\r\n\r\nHello!"
1054 fp = urllib2.urlopen("http://python.org/path")
1055 self.assertEqual(fp.geturl(), "http://python.org/path?query")
1059 ph = urllib2.ProxyHandler(dict(http="proxy.example.com:3128"))
1066 req = Request("http://acme.example.com/")
1077 ph = urllib2.ProxyHandler(dict(http="proxy.example.com"))
1079 req = Request("http://www.perl.org/")
1083 req = Request("http://www.python.org")
1140 "http://acme.example.com/protected",
1141 "http://acme.example.com/protected"
1160 "http://acme.example.com/protected",
1161 "http://acme.example.com/protected"
1167 ph = urllib2.ProxyHandler(dict(http="proxy.example.com:3128"))
1178 "http://acme.example.com:3128/protected",
1184 # response (http://python.org/sf/1479302), where it should instead
1188 # Also (http://python.org/sf/14797027, RFC 2617 section 1.2), we must
1222 "http://acme.example.com/protected",
1223 "http://acme.example.com/protected",
1258 # handle the HTTP auth error
1324 self.get = urllib2.Request("http://www.python.org/~jeremy/")
1325 self.post = urllib2.Request("http://www.python.org/~jeremy/",
1341 self.assertEqual("http://www.python.org/~jeremy/",
1346 req = urllib2.Request("http://www.python.org/")
1350 self.assertEqual("http", self.get.get_type())
1356 req = urllib2.Request("http://www.%70ython.org/")
1361 self.get.set_proxy("www.perl.org", "http")
1367 req = Request("<URL:http://www.python.org>")
1371 req = Request("http://www.python.org/?qs=query#fragment=true")
1373 req = Request("http://www.python.org/#fun=true")
1377 url = 'http://docs.python.org/library/urllib2.html#OK'