Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1faaVD-0006t7-Va for pgadmin-hackers@arkaria.postgresql.org; Wed, 04 Jul 2018 05:38:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1faaVA-0002rL-Q3 for pgadmin-hackers@arkaria.postgresql.org; Wed, 04 Jul 2018 05:38:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1faaVA-0002rE-HJ for pgadmin-hackers@lists.postgresql.org; Wed, 04 Jul 2018 05:38:52 +0000 Received: from mail-lf0-x22d.google.com ([2a00:1450:4010:c07::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1faaV5-0000p0-Gi for pgadmin-hackers@postgresql.org; Wed, 04 Jul 2018 05:38:51 +0000 Received: by mail-lf0-x22d.google.com with SMTP id m13-v6so3366243lfb.12 for ; Tue, 03 Jul 2018 22:38:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=JXbzWsFZLYOfT0ipEDbg14esgcjMYYFVGLtdOd3pPlE=; b=bsj4jhvq4+tnhsb+LcVWuVaX5p2f4CsYSQ5ZiFFgmh+yDcLBcszWWlriTE+MALbdy2 tKIRshsAGlCxd8wl70FgLcO2oL+5BcaPQI3gGfDqXfTrvrMgus1Y+GoRKYry7Sms51Df 0zyt6BrWWTCzaqQn0HJlPE91S//Za2Nza54TbbiZuoUfn1fm0gXUgRgh5Ig4BJGYUwil eYdBJ0CT00aSGc8Y/lBZ2WRTHk2+C/eN94hzSeN2SjjpEJoK8n4mb5cdoLX1Cg/meuv3 4ef2x5F6zylLN8LW6q8MB8vXZSOwvYxeNsU8OF8OR3VUfPEnd/4jKMmtTIAJBFqorBSY DmiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=JXbzWsFZLYOfT0ipEDbg14esgcjMYYFVGLtdOd3pPlE=; b=ttwAGu4g+uLez6rm6SSus3gE297l5zImqsBDKHCAMTRNrb+amhGQyA8FvaYTSVNwgG 787xsXBG/uvYFWfJdBo3onMMH43EAYJGiCg7n9oqFDD3FC5ownxvcdWDTNxrWg+33Epi RhRq4vzDlLZiDj3GoTCdf3BDCpwJ8ddFdNJ+90TOvEn3PeJsy6Y/bA936RayoGKugI/T njBWLva9HF7Oir/vlktMkx29g65q2P97FvAiqAemcSf+uK/RJBoURAR7lZrhYpebufBV IKiTduLqfKABnjzmSjHdfIMlKPpdHIzHFuqEooiiYCAVRr6EOxu/H+PSIlalTJUQOW/k 90bA== X-Gm-Message-State: APt69E2N2i40W9pfqcyCRsmODb4UmBpZ92mRK0adh6lDccfXRjOs+Tuh VbqmGqmKT7TmnnZL+DKS0lgSdcu+u7UdG4paqasfOg== X-Google-Smtp-Source: AAOMgpdTkyzaT4dUiygCN6j7pQUVypQpMUkyxdiLbUgEV4MAetN7QX22BLdyd2YsE0N5fd1RxpdcNvGhFrJ+GWSWlSE= X-Received: by 2002:a19:ebd7:: with SMTP id f84-v6mr443340lfk.18.1530682725395; Tue, 03 Jul 2018 22:38:45 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:850b:0:0:0:0:0 with HTTP; Tue, 3 Jul 2018 22:38:45 -0700 (PDT) In-Reply-To: References: From: Aditya Toshniwal Date: Wed, 4 Jul 2018 11:08:45 +0530 Message-ID: Subject: Re: [pgAdmin4][RM3371] Ping endpoint still send a pg4a_session cookie To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="0000000000001c8819057025d844" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000001c8819057025d844 Content-Type: text/plain; charset="UTF-8" Hi Dave, I tested with apache2 and it works fine. Below is the log: adityatoshniwal@ubuntu:~/.pgadmin/sessions$ ls -ltr total 0 adityatoshniwal@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@ubuntu:~/.pgadmin/sessions$ ls -ltr total 0 adityatoshniwal@ubuntu:~/.pgadmin/sessions$ On Mon, Jul 2, 2018 at 8:29 PM, Dave Page 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 enterprisedb.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" --0000000000001c8819057025d844 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Dave,

I tested with apache2 and it works fine. Below is= the log:

adityatoshni= wal@ubuntu:~/.pgadmin/sessions$ ls -ltr
total 0
adityatoshniwal@ubunt= u:~/.pgadmin/sessions$ curl -vvv "http://pgadmin.local/pgadmin/misc/ping"
*=C2=A0= =C2=A0 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.loca= l
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP= /1.1 200 OK
< Date: Wed, 04 Jul 2018 05:36:37 GMT
< Server: Apa= che/2.4.18 (Ubuntu)
< Set-Cookie: pga4_session=3Dd9ec42c2-7a9d-4e7a-a= bae-e510a7bee94e!7GpTdrxChvZaPCud1IZS4BdqwgU=3D; Expires=3DThu, 05-Jul-2018= 11:06:37 GMT; HttpOnly; Path=3D/
< Content-Length: 4
< Content= -Type: text/html; charset=3Dutf-8
<
* Connection #0 to host pgadm= in.local left intact
PINGadityatoshniwal@ubuntu:~/.pgadmin/sessions$ ls = -ltr
total 0
adityatoshniwal@ubuntu:~/.pgadmin/sessions$

<= br>

On= Mon, Jul 2, 2018 at 8:29 PM, Dave Page <dpage@pgadmin.org> = wrote:
Hi

=
I'm not in a position to test at the moment, but can you confirm t= his will work if the root of pgAdmin is at (for example) /pgadmin? So the a= ctual root is /pgadmin/misc/ping ?

On Mon, Jul 2, 2018 at = 1:35 PM, Aditya Toshniwal <aditya.toshniwal@enterpris= edb.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 frequentl= y.
The patch is to skip session file generation and session caching for the= URLs provided in SESSION_SKIP_PATH list config parameter. pg4a_session_coo= kie value will still be generated but nothing will be stored at the backend= .
Also, I have separated the garbage collection code in current ping servic= e 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 Engine= er |=C2=A0EnterpriseDB Software Solutions |=C2=A0Pune
"Don&#= 39;t Complain about Heat, Plant a tree"



--



--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB Software Solutions |=C2= =A0Pune
"Don't Complain about Heat, Plant a tree"
--0000000000001c8819057025d844--