tamentis / cartman

Command line Trac tools
http://tamentis.com/projects/cartman/
ISC License
22 stars 10 forks source link

Too many queries issued for "cm new" #14

Closed strk closed 8 years ago

strk commented 9 years ago

Adding debugging lines I see three GET requests being performed before starting the editor:

Getting /login
Getting /
Getting /query?max=1&order=priority

NOTE: the third one is modified as per #12 to reduce the size of returned page.

I understand the first one (which would ideally be avoided by storing cookies offline, see #13), but what's the second one for ?

tamentis commented 9 years ago

It's currently done as part of login() in order to "Load a page to get the new cookies". It might not be required on all Trac versions or even all authentication types.

strk commented 9 years ago

How about just checking if the "trac_auth" cookie exists after the first call ? I see the setCookie header sent in response to the /login action already.

tamentis commented 9 years ago

I dropped that get("/") in my sandbox without any issues, I'll try at work, we use a reverse-proxy for auth, if that works fine then we should be able to drop it.

strk commented 9 years ago

Dropping the get("/") worked for me too, against trac 1.0.5

tamentis commented 8 years ago

I pushed the removal of that extra get.