Пример #1
0
	def compose(authinfo):
		return HeaderElement.formatparam(b'realm', authinfo['realm'].encode('ISO8859-1', 'replace'), True)
Пример #2
0
	def parse(authinfo):
		params = HeaderElement.parseparams(b'X;%s' % authinfo)[1]
		params.setdefault('realm', '')
		return params
Пример #3
0
	def compose(cls, authinfo):
		params = cls._compose(authinfo)
		return b', '.join([HeaderElement.formatparam(k, v) for k, v in params])
Пример #4
0
 def compose(cls, authinfo):
     params = cls._compose(authinfo)
     return b', '.join([HeaderElement.formatparam(k, v) for k, v in params])
Пример #5
0
 def compose(authinfo):
     return HeaderElement.formatparam(
         b'realm', authinfo['realm'].encode('ISO8859-1', 'replace'), True)
Пример #6
0
 def parse(authinfo):
     params = HeaderElement.parseparams(b'X;%s' % authinfo)[1]
     params.setdefault('realm', '')
     return params