[Mailman-Developers] "Address already exists" when creating users, but it creates a new user anyway

Andrew Stuart andrew.stuart at supercoders.com.au
Sun Feb 1 09:23:49 CET 2015


In the commands below you can see that I start by getting a list of users, it returns "total_size": 1

I then execute a POST to the REST API multiple times.  Each time it says “Address already exists”, and then getting a list of users says total_size": 2

Is this the way its intended to work or a bug?

thanks

as


ubuntu at server01:~$
ubuntu at server01:~$ curl --header "authorization: Basic cmVzdGFkbWluOnJlc3RwYXNz" http://localhost:8001/3.0/users
{"entries": [{"password": "$6$rounds=109794$l/9MF2/dD7xSnoLD$6j3t0chh/UCnq61b3myleUaoHJEe4gNcidViWVR8kebKwU5oIVZ0ogsDiD7kgVr2V26zy8PaSfC5uQSY6rC0G1", "self_link": "http://localhost:8001/3.0/users/282607068158551958257628859360097200763", "user_id": 282607068158551958257628859360097200763, "http_etag": "\"7d81842c0a54679d42049c7eb25d64d2fd658b1a\"", "created_on": "2015-02-01T08:17:27.577221"}], "total_size": 1, "http_etag": "\"ae06e3745039c38b8a5c33d8bb468ba538fbb88a\"", "start": 0}ubuntu at server01:~$
ubuntu at server01:~$
ubuntu at server01:~$ curl -X POST --data "email=mailmanadmin at example.org" --header "authorization: Basic cmVzdGFkbWluOnJlc3RwYXNz" http://localhost:8001/3.0/users
Address already exists: mailmanadmin at example.orgubuntu@server01:~$
ubuntu at server01:~$
ubuntu at server01:~$ curl --header "authorization: Basic cmVzdGFkbWluOnJlc3RwYXNz" http://localhost:8001/3.0/users
{"entries": [{"password": "$6$rounds=109794$l/9MF2/dD7xSnoLD$6j3t0chh/UCnq61b3myleUaoHJEe4gNcidViWVR8kebKwU5oIVZ0ogsDiD7kgVr2V26zy8PaSfC5uQSY6rC0G1", "self_link": "http://localhost:8001/3.0/users/282607068158551958257628859360097200763", "user_id": 282607068158551958257628859360097200763, "http_etag": "\"7d81842c0a54679d42049c7eb25d64d2fd658b1a\"", "created_on": "2015-02-01T08:17:27.577221"}, {"self_link": "http://localhost:8001/3.0/users/92205393033160387796290186916038781151", "user_id": 92205393033160387796290186916038781151, "http_etag": "\"d44893d5fd8dccb797d19372c068d24b3d45dde9\"", "created_on": "2015-02-01T08:18:30.658821"}], "total_size": 2, "http_etag": "\"7060713ada4dbbbc97a8da2f1c3545f41c0878af\"", "start": 0}ubuntu at server01:~$
ubuntu at server01:~$
ubuntu at server01:~$ curl -X POST --data "email=mailmanadmin at example.org" --header "authorization: Basic cmVzdGFkbWluOnJlc3RwYXNz" http://localhost:8001/3.0/users
Address already exists: mailmanadmin at example.orgubuntu@server01:~$
ubuntu at server01:~$
ubuntu at server01:~$ curl --header "authorization: Basic cmVzdGFkbWluOnJlc3RwYXNz" http://localhost:8001/3.0/users
{"entries": [{"password": "$6$rounds=109794$l/9MF2/dD7xSnoLD$6j3t0chh/UCnq61b3myleUaoHJEe4gNcidViWVR8kebKwU5oIVZ0ogsDiD7kgVr2V26zy8PaSfC5uQSY6rC0G1", "self_link": "http://localhost:8001/3.0/users/282607068158551958257628859360097200763", "user_id": 282607068158551958257628859360097200763, "http_etag": "\"7d81842c0a54679d42049c7eb25d64d2fd658b1a\"", "created_on": "2015-02-01T08:17:27.577221"}, {"self_link": "http://localhost:8001/3.0/users/92205393033160387796290186916038781151", "user_id": 92205393033160387796290186916038781151, "http_etag": "\"d44893d5fd8dccb797d19372c068d24b3d45dde9\"", "created_on": "2015-02-01T08:18:30.658821"}, {"self_link": "http://localhost:8001/3.0/users/276766536585189861964818785630123864804", "user_id": 276766536585189861964818785630123864804, "http_etag": "\"edf93f04566715b1afaeaee0368bc2101aa0d8b3\"", "created_on": "2015-02-01T08:19:03.900670"}], "total_size": 3, "http_etag": "\"49ffe8ac58d624c250ec6af339f4cab609f4e138\"", "start": 0}ubuntu at server01:~$
ubuntu at server01:~$


More information about the Mailman-Developers mailing list