On 07/09/2020 13.36, sebb wrote:
On Mon, 7 Sep 2020 at 03:40, <[email protected]> wrote:

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit 71fec7052798634d9556b225530e0cfdbc788d57
Author: Daniel Gruno <[email protected]>
AuthorDate: Mon Sep 7 04:38:21 2020 +0200

     strip header key
---
  server/plugins/session.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins/session.py b/server/plugins/session.py
index fde3cfc..bd5abff 100644
--- a/server/plugins/session.py
+++ b/server/plugins/session.py
@@ -115,5 +115,5 @@ async def set_session(server: plugins.server.BaseServer, 
**credentials):
      session = SessionObject(server)
      session.credentials = SessionCredentials(credentials)
      server.data.sessions[session_id] = session
+    return cookie.output(header='').lstrip()

Why is that lstrip() and not strip()?

It's a work in progress. The output function will always return a full HTTP response header line, which is something like "Set-Cookie: foo". If you specify no header, it will still print out " foo" instead of "foo", so we strip the left side of it for whitespace. I'm looking into a way to just get the value and not have any header key inserted.



-    return cookie.output()


Reply via email to