calling named operation on launchpad.me

Bug #504297 reported by Edwin Grubbs
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
launchpadlib
Triaged
Low
Unassigned

Bug Description

Calling launchpad.me.join(team=foo) does not work since a POST to /people/+me gets redirected to the canonical url /~person and according to the http specification a POST that gets a redirect should not be re-posted at the new url without user confirmation. This is very confusing, since you just get back a dictionary directly converted from the json.

If I was manually creating HTTP requests, it would be very clear that I was getting a redirect. launchpadlib hides this and makes a GET request on the new url. At the very least, launchpadlib should raise an exception. Since launchpadlib is bound to a specific api on top of lazr.restfulclient, I think it would make sense for it to re-post the named operation on the new url. Also, in the case of launchpad.me, it would be nice if it didn't re-request the object every time it is accessed, since it should know that launchpad.me won't point to another person unless the login changes.

Revision history for this message
Robert Collins (lifeless) wrote :

.me probably should just resolve on access, once, so that after that its known and url combining is done appropriately

Revision history for this message
Robert Collins (lifeless) wrote :

However, this isn't currently roadmapped; would love it if someone wanted to put together a patch.

Changed in launchpadlib:
importance: High → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.