Need a favour from someone using Python

Soldato
Joined
18 Oct 2002
Posts
9,598
Location
Sunderland
We are experiencing some minor annoyances in our core business application from URLs being requested in lower case by a remote client which indicates it is using the Python urllib.

Can someone familiar with Python do me a little test to see whether using urllib always requests urls in lower case even when not specified in lower case? Can you also test whether it could just be images requested in lower case?

http://docs.python.org/library/urllib.html

If not I'll have a look myself, but never needed to look into Python so thought if someone is more familiar it would save me a lot of time. Ta very much.
 
Im pretty sure it will maintain the case.

Code:
#!/usr/bin/env python

import urllib

file = urllib.urlopen("HTTP://www.Google.co.uk")
print("URL:%s \n" % file.geturl())

Gives 'URL:http://www.Google.co.uk' . Notice the HTTP is made into lower case but the rest is preserved.
 
Back
Top Bottom