summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-03-23 15:45:24 +0200
committerLars Wirzenius <liw@liw.fi>2017-03-23 15:45:24 +0200
commitc882278f10f5d72535b3e08c89a3a2068ca706ef (patch)
tree4024aef1e30a933d9ac42bc51d705e5f61c7e563
parent2f5cc693818e0be6657bf7a8dfb3f7db70e7e7f8 (diff)
downloadserver-yarns-c882278f10f5d72535b3e08c89a3a2068ca706ef.tar.gz
Handle non-ascii http bodies
-rw-r--r--100-mail.yarn4
-rw-r--r--900-implements.yarn6
2 files changed, 5 insertions, 5 deletions
diff --git a/100-mail.yarn b/100-mail.yarn
index 5c64299..60e0be9 100644
--- a/100-mail.yarn
+++ b/100-mail.yarn
@@ -44,11 +44,11 @@ utility. Each password should be stored using a name
AND mails for liw with subject $R get deleted
GIVEN large random number R
- WHEN someone sends mail to liw@liw.fi with subject $R
+ WHEN someone sends mail to liw-passthrough@liw.fi with subject $R
THEN mailbox of liw has a mail with subject $R
AND mails for liw with subject $R get deleted
- WHEN someone sends mail to bugs@liw.fi with subject $R
+ WHEN someone sends mail to bugs-passthrough@liw.fi with subject $R
THEN mailbox of distix has a mail with subject $R
AND mailbox of liw has a mail with subject $R
AND mails for distix with subject $R get deleted
diff --git a/900-implements.yarn b/900-implements.yarn
index 8a0c8db..7e6ef72 100644
--- a/900-implements.yarn
+++ b/900-implements.yarn
@@ -29,7 +29,7 @@
import re, sys, yarnhelper
h = yarnhelper.YarnHelper()
body = h.get_variable('http_body')
- sys.stdout.write('Body:\n{}'.format(body))
+ sys.stdout.write('Body:\n{}'.format(repr(body)))
pattern = h.get_next_match()
m = re.search(pattern, body)
h.assertNotEqual(m, None)
@@ -132,7 +132,7 @@
subject = h.get_variable(subject_key)
print 'Wanted:', subject
address = os.environ['ADDRESS']
- pass_name = 'server-yarns/imap/{}@{}'.format(user, address)
+ pass_name = 'pieni.net/{}'.format(user)
pass_home = os.environ['PASS_HOME']
password = h.get_password_with_pass(pass_home, pass_name)
got_it = False
@@ -153,7 +153,7 @@
subject = h.get_variable(subject_key)
print 'Wanted:', subject
address = os.environ['ADDRESS']
- pass_name = 'server-yarns/imap/{}@{}'.format(user, address)
+ pass_name = 'pieni.net/{}'.format(user)
pass_home = os.environ['PASS_HOME']
password = h.get_password_with_pass(pass_home, pass_name)
def delete_matching(imapobj, msgid, msg):