You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ponymail.apache.org by sebb <se...@gmail.com> on 2020/09/07 11:36:28 UTC
Re: [incubator-ponymail-foal] 04/05: strip header key
On Mon, 7 Sep 2020 at 03:40, <hu...@apache.org> 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 <hu...@apache.org>
> 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()?
>
> - return cookie.output()
>
Re: [incubator-ponymail-foal] 04/05: strip header key
Posted by Daniel Gruno <hu...@apache.org>.
On 07/09/2020 13.36, sebb wrote:
> On Mon, 7 Sep 2020 at 03:40, <hu...@apache.org> 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 <hu...@apache.org>
>> 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()
>>