~stefanor/ibid/ibid-plugin-507489

« back to all changes in this revision

Viewing changes to ibid/source/http.py

  • Committer: Michael Gorven
  • Date: 2010-01-07 10:56:45 UTC
  • mfrom: (829.2.8 smtp-fixes)
  • Revision ID: michael@gorven.za.net-20100107105645-4wod6mu0y2mwixqj
SMTP fixes: Unicode, relayhost, headers; Content-Type header for HTTP.
https://code.launchpad.net/~mgorven/ibid/smtp-fixes/+merge/16843

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
 
51
51
    def respond(self, event, request):
52
52
        output = '\n'.join([response['reply'].encode('utf-8') for response in event.responses])
 
53
        request.setHeader('Content-Type', 'text/plain; charset=utf-8')
53
54
        request.write(output)
54
55
        request.finish()
55
56
        self.log.debug(u"Responded to request from %s: %s", event.sender['connection'], output)