Changeset 153

Show
Ignore:
Timestamp:
05/20/08 16:21:19
Author:
thejimmyg
Message:

Applied charset patch to form.py, fixes #53

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • AuthKit/trunk/CHANGELOG.txt

    r152 r153  
    440.4.1 (**svn**) 
    55 
     6* Applied patch from Pawel Niewiadomski to fix #53 
    67* Changed the import of the openid.sreg module to openid.extensions.sreg 
    78* Fixed the encoding of the form.py file 
  • AuthKit/trunk/authkit/authenticate/form.py

    r152 r153  
    6464        AuthFormHandler.__init__(self, app, **p) 
    6565        self.status = status 
    66         if charset is None: 
    67             self.charset = '' 
    68         else: 
    69             self.charset = '; charset='+charset 
     66        self.content_type = 'text/html' 
     67        if charset is not None: 
     68            self.content_type = self.content_type + '; charset='+charset 
     69            self.charset = charset 
    7070        self.method = method 
    7171     
     
    101101        else: 
    102102            content = self.template(method=self.method) % (action) 
     103        if self.charset is not None: 
     104            content = content.encode(self.charset) 
    103105             
    104106        # @@@ Tell Pylons error documents middleware not to intercept the  
     
    108110            self.status, 
    109111            [ 
    110                 ('Content-Type', 'text/html'+self.charset), 
     112                ('Content-Type', self.content_type), 
    111113                ('Content-Length', str(len(content))) 
    112114            ]