Re: [pgAdmin4][RM3371] Ping endpoint still send a pg4a_session cookie

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][RM3371] Ping endpoint still send a pg4a_session cookie
Date: 2018-07-05 10:12:16
Message-ID: CA+OCxozEuBxJO-9k-Kv8WLpk1YgpmT=zA8uhhPriPoZFbo4vNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Thanks, patch applied.

On Wed, Jul 4, 2018 at 6:38 AM, Aditya Toshniwal <
aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:

> Hi Dave,
>
> I tested with apache2 and it works fine. Below is the log:
>
> adityatoshniwal(at)ubuntu:~/.pgadmin/sessions$ ls -ltr
> total 0
> adityatoshniwal(at)ubuntu:~/.pgadmin/sessions$ curl -vvv "
> http://pgadmin.local/pgadmin/misc/ping"
> * Trying 127.0.0.1...
> * Connected to pgadmin.local (127.0.0.1) port 80 (#0)
> > GET /pgadmin/misc/ping HTTP/1.1
> > Host: pgadmin.local
> > User-Agent: curl/7.47.0
> > Accept: */*
> >
> < HTTP/1.1 200 OK
> < Date: Wed, 04 Jul 2018 05:36:37 GMT
> < Server: Apache/2.4.18 (Ubuntu)
> < Set-Cookie: pga4_session=d9ec42c2-7a9d-4e7a-abae-e510a7bee94e!7GpTdrxChvZaPCud1IZS4BdqwgU=;
> Expires=Thu, 05-Jul-2018 11:06:37 GMT; HttpOnly; Path=/
> < Content-Length: 4
> < Content-Type: text/html; charset=utf-8
> <
> * Connection #0 to host pgadmin.local left intact
> PINGadityatoshniwal(at)ubuntu:~/.pgadmin/sessions$ ls -ltr
> total 0
> adityatoshniwal(at)ubuntu:~/.pgadmin/sessions$
>
>
> On Mon, Jul 2, 2018 at 8:29 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
>> Hi
>>
>> I'm not in a position to test at the moment, but can you confirm this
>> will work if the root of pgAdmin is at (for example) /pgadmin? So the
>> actual root is /pgadmin/misc/ping ?
>>
>> On Mon, Jul 2, 2018 at 1:35 PM, Aditya Toshniwal <
>> aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
>>
>>> Hi Hackers,
>>>
>>> Attached is the patch for fixing RM3371 where /misc/ping service
>>> generate session file for each call and so cannot be used frequently.
>>> The patch is to skip session file generation and session caching for the
>>> URLs provided in SESSION_SKIP_PATH list config parameter.
>>> pg4a_session_cookie value will still be generated but nothing will be
>>> stored at the backend.
>>> Also, I have separated the garbage collection code in current ping
>>> service to a new url /misc/cleanup. /misc/ping will be purely for is alive
>>> check.
>>>
>>> Request you to kindly review.
>>>
>>> --
>>> Thanks and Regards,
>>> Aditya Toshniwal
>>> Software Engineer | EnterpriseDB Software Solutions | Pune
>>> "Don't Complain about Heat, Plant a tree"
>>>
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"
>

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2018-07-05 10:21:18 Re: [pgAdmin4][Patch]: RM #3397 Add support for JIT stats in EXPLAIN output in PG11
Previous Message Dave Page 2018-07-05 10:12:06 pgAdmin 4 commit: Don't create a session when the /misc/ping test endpo