1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues


Issue #3009 resolved

Adding Members to Group via API fails. (BB-2533)

Linden Lab
created an issue

{{{ $ curl -u lindenlab:secret -X PUT https://api.bitbucket.org/1.0/groups/lindenlab/lindens/members/vadim_productengine/ <html><body><h1>502 Bad Gateway</h1> The server returned an invalid or incomplete response. </body></html> }}}

Comments (3)

  1. Jesper Noehr
    • changed status to open

    This has to do with curl not sending Content-Length for PUT requests with no data. If you add a dummy payload, it'll work. Try adding -d 'foo=bar' to your curl command.

    We'll try and fix it so it'll work without a payload too.

  2. Charles McLaughlin

    This was a regression in our Nginx config. We reverted back to the way it used to be. Please note you'll most likely need to specify "Content-Length: 0". Here's an example:

    cmclaughlin@cm:/tmp$ curl -u cmclaughlin:removed -X PUT https://api.bitbucket.org/1.0/groups/cmclaughlin/foo/members/jespern -H "Content-Length: 0"
        "username": "jespern", 
        "first_name": "Jesper", 
        "last_name": "Noehr", 
        "avatar": "https://secure.gravatar.com/avatar/b658715b9635ef057daf2a22d4a8f36e?d=identicon&s=32", 
        "resource_uri": "/1.0/users/jespern"
  3. Log in to comment