Mailing List Archive

Cookie setting refactor
Interchangers,

I'd like any review/input I can get on this minor refactor of the routine
that builds Set-Cookie headers:

https://github.com/jonjensen/interchange/commit/69c6a24c2377ccb335bda3f1ff90ff636869ea82

The initial impetus for changing it was that it adds multiple ;; and extra
whitespace in some cases, due to the way it's concatenating strings with
some conditionals happening and some not.

The extra ; and whitespace didn't break anything because the cookie spec
is tolerant of extra junk in there, but it made me have to go check and
test in browsers to be sure.

It's faster (on a microoptimization level) to build up strings in an array
and join afterwards, which also avoids any extra separators, so I did it
that way.

This has been running in production at one busy site for a week or so.

Thanks,
Jon

--
Jon Jensen
End Point Corporation
https://www.endpoint.com/

_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Re: Cookie setting refactor [ In reply to ]
On 12/01/17 05:46, Jon Jensen wrote:
> Interchangers,
>
> I'd like any review/input I can get on this minor refactor of the
> routine that builds Set-Cookie headers:
>
> https://github.com/jonjensen/interchange/commit/69c6a24c2377ccb335bda3f1ff90ff636869ea82

+1


Peter


_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Re: Cookie setting refactor [ In reply to ]
> On 12/01/17 05:46, Jon Jensen wrote:
> > Interchangers,
> >
> > I'd like any review/input I can get on this minor refactor of the
> > routine that builds Set-Cookie headers:
> >
> >
> https://github.com/jonjensen/interchange/commit/69c6a24c2377ccb335bda3
> > f1ff90ff636869ea82
>
> +1
>

Looking good Jon! +1 from me. :)

CU,

Gert


_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Re: Cookie setting refactor [ In reply to ]
On Thu, 12 Jan 2017, Gert van der Spoel wrote:

>> On 12/01/17 05:46, Jon Jensen wrote:
>>> Interchangers,
>>>
>>> I'd like any review/input I can get on this minor refactor of the
>>> routine that builds Set-Cookie headers:
>>>
>>>
>>> https://github.com/jonjensen/interchange/commit/69c6a24c2377ccb335bda3f1ff90ff636869ea82
>>
>> +1
>
> Looking good Jon! +1 from me. :)

Thanks for the review, everyone. I pushed that commit to master.

Jon


--
Jon Jensen
End Point Corporation
https://www.endpoint.com/

_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users