[Zope] change User-Agent

Dmitry Matveev Dmitry Matveev <matveev@uralfirm.ru>
Mon, 28 Apr 2003 10:29:44 +0600


Hello all!

To change User-Agent, when getting image in python i use:

import urllib2
user_agent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
request = urllib2.Request('http://www.something.com/img.gif')
request.add_header("User-Agent", user_agent)
response = urllib2.urlopen(request)

How can I do something like than on server in Zope (DTML or ZPT)
before  getting image
<img src="http://www.something.com/img.gif" width="200" height="300">
  

-- 
Best regards,                          www.uralfirm.ru
Dmitry Matveev                         mailto:matveev@uralfirm.ru