Lines Matching full:http

5 RFC1808_BASE = "http://a/b/c/d;p?q#f"
6 RFC2396_BASE = "http://a/b/c/d;p?q"
7 RFC3986_BASE = 'http://a/b/c/d;p?q'
8 SIMPLE_BASE = 'http://a/b/c/d'
173 # urlparse.urlsplit treats 'http:' as an optimized special case,
174 # so we test both 'http:' and 'https:' in all the following.
193 for scheme in ('http', 'https'):
212 self.checkJoin(RFC1808_BASE, 'g', 'http://a/b/c/g')
213 self.checkJoin(RFC1808_BASE, './g', 'http://a/b/c/g')
214 self.checkJoin(RFC1808_BASE, 'g/', 'http://a/b/c/g/')
215 self.checkJoin(RFC1808_BASE, '/g', 'http://a/g')
216 self.checkJoin(RFC1808_BASE, '//g', 'http://g')
217 self.checkJoin(RFC1808_BASE, 'g?y', 'http://a/b/c/g?y')
218 self.checkJoin(RFC1808_BASE, 'g?y/./x', 'http://a/b/c/g?y/./x')
219 self.checkJoin(RFC1808_BASE, '#s', 'http://a/b/c/d;p?q#s')
220 self.checkJoin(RFC1808_BASE, 'g#s', 'http://a/b/c/g#s')
221 self.checkJoin(RFC1808_BASE, 'g#s/./x', 'http://a/b/c/g#s/./x')
222 self.checkJoin(RFC1808_BASE, 'g?y#s', 'http://a/b/c/g?y#s')
223 self.checkJoin(RFC1808_BASE, 'g;x', 'http://a/b/c/g;x')
224 self.checkJoin(RFC1808_BASE, 'g;x?y#s', 'http://a/b/c/g;x?y#s')
225 self.checkJoin(RFC1808_BASE, '.', 'http://a/b/c/')
226 self.checkJoin(RFC1808_BASE, './', 'http://a/b/c/')
227 self.checkJoin(RFC1808_BASE, '..', 'http://a/b/')
228 self.checkJoin(RFC1808_BASE, '../', 'http://a/b/')
229 self.checkJoin(RFC1808_BASE, '../g', 'http://a/b/g')
230 self.checkJoin(RFC1808_BASE, '../..', 'http://a/')
231 self.checkJoin(RFC1808_BASE, '../../', 'http://a/')
232 self.checkJoin(RFC1808_BASE, '../../g', 'http://a/g')
235 self.checkJoin(RFC1808_BASE, '', 'http://a/b/c/d;p?q#f')
236 self.checkJoin(RFC1808_BASE, '../../../g', 'http://a/../g')
237 self.checkJoin(RFC1808_BASE, '../../../../g', 'http://a/../../g')
238 self.checkJoin(RFC1808_BASE, '/./g', 'http://a/./g')
239 self.checkJoin(RFC1808_BASE, '/../g', 'http://a/../g')
240 self.checkJoin(RFC1808_BASE, 'g.', 'http://a/b/c/g.')
241 self.checkJoin(RFC1808_BASE, '.g', 'http://a/b/c/.g')
242 self.checkJoin(RFC1808_BASE, 'g..', 'http://a/b/c/g..')
243 self.checkJoin(RFC1808_BASE, '..g', 'http://a/b/c/..g')
244 self.checkJoin(RFC1808_BASE, './../g', 'http://a/b/g')
245 self.checkJoin(RFC1808_BASE, './g/.', 'http://a/b/c/g/')
246 self.checkJoin(RFC1808_BASE, 'g/./h', 'http://a/b/c/g/h')
247 self.checkJoin(RFC1808_BASE, 'g/../h', 'http://a/b/c/h')
251 #self.checkJoin(RFC1808_BASE, 'http:g', 'http:g')
252 #self.checkJoin(RFC1808_BASE, 'http:', 'http:')
262 self.checkJoin(RFC2396_BASE, 'g', 'http://a/b/c/g')
263 self.checkJoin(RFC2396_BASE, './g', 'http://a/b/c/g')
264 self.checkJoin(RFC2396_BASE, 'g/', 'http://a/b/c/g/')
265 self.checkJoin(RFC2396_BASE, '/g', 'http://a/g')
266 self.checkJoin(RFC2396_BASE, '//g', 'http://g')
267 self.checkJoin(RFC2396_BASE, 'g?y', 'http://a/b/c/g?y')
268 self.checkJoin(RFC2396_BASE, '#s', 'http://a/b/c/d;p?q#s')
269 self.checkJoin(RFC2396_BASE, 'g#s', 'http://a/b/c/g#s')
270 self.checkJoin(RFC2396_BASE, 'g?y#s', 'http://a/b/c/g?y#s')
271 self.checkJoin(RFC2396_BASE, 'g;x', 'http://a/b/c/g;x')
272 self.checkJoin(RFC2396_BASE, 'g;x?y#s', 'http://a/b/c/g;x?y#s')
273 self.checkJoin(RFC2396_BASE, '.', 'http://a/b/c/')
274 self.checkJoin(RFC2396_BASE, './', 'http://a/b/c/')
275 self.checkJoin(RFC2396_BASE, '..', 'http://a/b/')
276 self.checkJoin(RFC2396_BASE, '../', 'http://a/b/')
277 self.checkJoin(RFC2396_BASE, '../g', 'http://a/b/g')
278 self.checkJoin(RFC2396_BASE, '../..', 'http://a/')
279 self.checkJoin(RFC2396_BASE, '../../', 'http://a/')
280 self.checkJoin(RFC2396_BASE, '../../g', 'http://a/g')
282 self.checkJoin(RFC2396_BASE, '../../../g', 'http://a/../g')
283 self.checkJoin(RFC2396_BASE, '../../../../g', 'http://a/../../g')
284 self.checkJoin(RFC2396_BASE, '/./g', 'http://a/./g')
285 self.checkJoin(RFC2396_BASE, '/../g', 'http://a/../g')
286 self.checkJoin(RFC2396_BASE, 'g.', 'http://a/b/c/g.')
287 self.checkJoin(RFC2396_BASE, '.g', 'http://a/b/c/.g')
288 self.checkJoin(RFC2396_BASE, 'g..', 'http://a/b/c/g..')
289 self.checkJoin(RFC2396_BASE, '..g', 'http://a/b/c/..g')
290 self.checkJoin(RFC2396_BASE, './../g', 'http://a/b/g')
291 self.checkJoin(RFC2396_BASE, './g/.', 'http://a/b/c/g/')
292 self.checkJoin(RFC2396_BASE, 'g/./h', 'http://a/b/c/g/h')
293 self.checkJoin(RFC2396_BASE, 'g/../h', 'http://a/b/c/h')
294 self.checkJoin(RFC2396_BASE, 'g;x=1/./y', 'http://a/b/c/g;x=1/y')
295 self.checkJoin(RFC2396_BASE, 'g;x=1/../y', 'http://a/b/c/y')
296 self.checkJoin(RFC2396_BASE, 'g?y/./x', 'http://a/b/c/g?y/./x')
297 self.checkJoin(RFC2396_BASE, 'g?y/../x', 'http://a/b/c/g?y/../x')
298 self.checkJoin(RFC2396_BASE, 'g#s/./x', 'http://a/b/c/g#s/./x')
299 self.checkJoin(RFC2396_BASE, 'g#s/../x', 'http://a/b/c/g#s/../x')
303 self.checkJoin(RFC3986_BASE, '?y','http://a/b/c/d;p?y')
304 self.checkJoin(RFC2396_BASE, ';x', 'http://a/b/c/;x')
306 self.checkJoin(RFC3986_BASE, 'g','http://a/b/c/g')
307 self.checkJoin(RFC3986_BASE, './g','http://a/b/c/g')
308 self.checkJoin(RFC3986_BASE, 'g/','http://a/b/c/g/')
309 self.checkJoin(RFC3986_BASE, '/g','http://a/g')
310 self.checkJoin(RFC3986_BASE, '//g','http://g')
311 self.checkJoin(RFC3986_BASE, '?y','http://a/b/c/d;p?y')
312 self.checkJoin(RFC3986_BASE, 'g?y','http://a/b/c/g?y')
313 self.checkJoin(RFC3986_BASE, '#s','http://a/b/c/d;p?q#s')
314 self.checkJoin(RFC3986_BASE, 'g#s','http://a/b/c/g#s')
315 self.checkJoin(RFC3986_BASE, 'g?y#s','http://a/b/c/g?y#s')
316 self.checkJoin(RFC3986_BASE, ';x','http://a/b/c/;x')
317 self.checkJoin(RFC3986_BASE, 'g;x','http://a/b/c/g;x')
318 self.checkJoin(RFC3986_BASE, 'g;x?y#s','http://a/b/c/g;x?y#s')
319 self.checkJoin(RFC3986_BASE, '','http://a/b/c/d;p?q')
320 self.checkJoin(RFC3986_BASE, '.','http://a/b/c/')
321 self.checkJoin(RFC3986_BASE, './','http://a/b/c/')
322 self.checkJoin(RFC3986_BASE, '..','http://a/b/')
323 self.checkJoin(RFC3986_BASE, '../','http://a/b/')
324 self.checkJoin(RFC3986_BASE, '../g','http://a/b/g')
325 self.checkJoin(RFC3986_BASE, '../..','http://a/')
326 self.checkJoin(RFC3986_BASE, '../../','http://a/')
327 self.checkJoin(RFC3986_BASE, '../../g','http://a/g')
334 #self.checkJoin(RFC3986_BASE, '../../../g','http://a/g')
335 #self.checkJoin(RFC3986_BASE, '../../../../g','http://a/g')
336 #self.checkJoin(RFC3986_BASE, '/./g','http://a/g')
337 #self.checkJoin(RFC3986_BASE, '/../g','http://a/g')
339 self.checkJoin(RFC3986_BASE, 'g.','http://a/b/c/g.')
340 self.checkJoin(RFC3986_BASE, '.g','http://a/b/c/.g')
341 self.checkJoin(RFC3986_BASE, 'g..','http://a/b/c/g..')
342 self.checkJoin(RFC3986_BASE, '..g','http://a/b/c/..g')
343 self.checkJoin(RFC3986_BASE, './../g','http://a/b/g')
344 self.checkJoin(RFC3986_BASE, './g/.','http://a/b/c/g/')
345 self.checkJoin(RFC3986_BASE, 'g/./h','http://a/b/c/g/h')
346 self.checkJoin(RFC3986_BASE, 'g/../h','http://a/b/c/h')
347 self.checkJoin(RFC3986_BASE, 'g;x=1/./y','http://a/b/c/g;x=1/y')
348 self.checkJoin(RFC3986_BASE, 'g;x=1/../y','http://a/b/c/y')
349 self.checkJoin(RFC3986_BASE, 'g?y/./x','http://a/b/c/g?y/./x')
350 self.checkJoin(RFC3986_BASE, 'g?y/../x','http://a/b/c/g?y/../x')
351 self.checkJoin(RFC3986_BASE, 'g#s/./x','http://a/b/c/g#s/./x')
352 self.checkJoin(RFC3986_BASE, 'g#s/../x','http://a/b/c/g#s/../x')
353 #self.checkJoin(RFC3986_BASE, 'http:g','http:g') # strict parser
354 self.checkJoin(RFC3986_BASE, 'http:g','http://a/b/c/g') # relaxed parser
357 self.checkJoin('http://a/b/c/de', ';x','http://a/b/c/;x')
361 self.checkJoin(SIMPLE_BASE, 'http:g','http://a/b/c/g')
362 self.checkJoin(SIMPLE_BASE, 'http:','http://a/b/c/d')
363 self.checkJoin(SIMPLE_BASE, 'g','http://a/b/c/g')
364 self.checkJoin(SIMPLE_BASE, './g','http://a/b/c/g')
365 self.checkJoin(SIMPLE_BASE, 'g/','http://a/b/c/g/')
366 self.checkJoin(SIMPLE_BASE, '/g','http://a/g')
367 self.checkJoin(SIMPLE_BASE, '//g','http://g')
368 self.checkJoin(SIMPLE_BASE, '?y','http://a/b/c/d?y')
369 self.checkJoin(SIMPLE_BASE, 'g?y','http://a/b/c/g?y')
370 self.checkJoin(SIMPLE_BASE, 'g?y/./x','http://a/b/c/g?y/./x')
371 self.checkJoin(SIMPLE_BASE, '.','http://a/b/c/')
372 self.checkJoin(SIMPLE_BASE, './','http://a/b/c/')
373 self.checkJoin(SIMPLE_BASE, '..','http://a/b/')
374 self.checkJoin(SIMPLE_BASE, '../','http://a/b/')
375 self.checkJoin(SIMPLE_BASE, '../g','http://a/b/g')
376 self.checkJoin(SIMPLE_BASE, '../..','http://a/')
377 self.checkJoin(SIMPLE_BASE, '../../g','http://a/g')
378 self.checkJoin(SIMPLE_BASE, '../../../g','http://a/../g')
379 self.checkJoin(SIMPLE_BASE, './../g','http://a/b/g')
380 self.checkJoin(SIMPLE_BASE, './g/.','http://a/b/c/g/')
381 self.checkJoin(SIMPLE_BASE, '/./g','http://a/./g')
382 self.checkJoin(SIMPLE_BASE, 'g/./h','http://a/b/c/g/h')
383 self.checkJoin(SIMPLE_BASE, 'g/../h','http://a/b/c/h')
384 self.checkJoin(SIMPLE_BASE, 'http:g','http://a/b/c/g')
385 self.checkJoin(SIMPLE_BASE, 'http:','http://a/b/c/d')
386 self.checkJoin(SIMPLE_BASE, 'http:?y','http://a/b/c/d?y')
387 self.checkJoin(SIMPLE_BASE, 'http:g?y','http://a/b/c/g?y')
388 self.checkJoin(SIMPLE_BASE, 'http:g?y/./x','http://a/b/c/g?y/./x')
389 self.checkJoin('http:///', '..','http:///')
390 self.checkJoin('', 'http://a/b/c/g?y/./x','http://a/b/c/g?y/./x')
391 self.checkJoin('', 'http://a/./g', 'http://a/./g')
397 ('http://Test.python.org:5432/foo/', 'test.python.org', 5432),
398 ('http://12.34.56.78:5432/foo/', '12.34.56.78', 5432),
399 ('http://[::1]:5432/foo/', '::1', 5432),
400 ('http://[dead:beef::1]:5432/foo/', 'dead:beef::1', 5432),
401 ('http://[dead:beef::]:5432/foo/', 'dead:beef::', 5432),
402 ('http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]:5432/foo/',
404 ('http://[::12.34.56.78]:5432/foo/', '::12.34.56.78', 5432),
405 ('http://[::ffff:12.34.56.78]:5432/foo/',
407 ('http://Test.python.org/foo/', 'test.python.org', None),
408 ('http://12.34.56.78/foo/', '12.34.56.78', None),
409 ('http://[::1]/foo/', '::1', None),
410 ('http://[dead:beef::1]/foo/', 'dead:beef::1', None),
411 ('http://[dead:beef::]/foo/', 'dead:beef::', None),
412 ('http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]/foo/',
414 ('http://[::12.34.56.78]/foo/', '::12.34.56.78', None),
415 ('http://[::ffff:12.34.56.78]/foo/',
417 ('http://Test.python.org:/foo/', 'test.python.org', None),
418 ('http://12.34.56.78:/foo/', '12.34.56.78', None),
419 ('http://[::1]:/foo/', '::1', None),
420 ('http://[dead:beef::1]:/foo/', 'dead:beef::1', None),
421 ('http://[dead:beef::]:/foo/', 'dead:beef::', None),
422 ('http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]:/foo/',
424 ('http://[::12.34.56.78]:/foo/', '::12.34.56.78', None),
425 ('http://[::ffff:12.34.56.78]:/foo/',
432 'http://::12.34.56.78]/',
433 'http://[::1/foo/',
435 'http://[::1/foo/bad]/bad',
436 'http://[::ffff:12.34.56.78']:
441 ('http://python.org#frag', 'http://python.org', 'frag'),
442 ('http://python.org', 'http://python.org', ''),
443 ('http://python.org/#frag', 'http://python.org/', 'frag'),
444 ('http://python.org/', 'http://python.org/', ''),
445 ('http://python.org/?q#frag', 'http://python.org/?q', 'frag'),
446 ('http://python.org/?q', 'http://python.org/?q', ''),
447 ('http://python.org/p#frag', 'http://python.org/p', 'frag'),
448 ('http://python.org/p?q', 'http://python.org/p?q', ''),
449 (RFC1808_BASE, 'http://a/b/c/d;p?q', 'f'),
450 (RFC2396_BASE, 'http://a/b/c/d;p?q', ''),
455 url = "HTTP://WWW.PYTHON.ORG/doc/#frag"
457 self.assertEqual(p.scheme, "http")
470 url = "http://User:Pass@www.python.org:080/doc/?query=yes#frag"
472 self.assertEqual(p.scheme, "http")
487 url = "http://User@example.com:Pass@www.python.org:080/doc/?query=yes#frag"
489 self.assertEqual(p.scheme, "http")
501 url = "http://www.python.org:65536"
548 p = urlparse.urlsplit("http://www.example.net:foo")
552 p = urlparse.urlparse("http://www.example.net:foo")
581 uri = "http://example.com/doc/"
591 # Issue 1637: http://foo.com?query is legal
592 self.assertEqual(urlparse.urlparse("http://example.com?blahblah=/foo"),
593 ('http', 'example.com', '', '', 'blahblah=/foo', ''))
615 self.assertEqual(urlparse.urlparse("http://www.python.org:80"),
616 ('http','www.python.org:80','','','',''))
622 self.assertEqual(urlparse.urlparse("http:"),('http','','','','',''))
624 self.assertEqual(urlparse.urlparse("http://www.python.org:80"),
625 ('http','www.python.org:80','','','',''))