Skip to content

GitLab

    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    • Menu
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • MailmanClient MailmanClient
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 13
    • Issues 13
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNU Mailman
  • MailmanClientMailmanClient
  • Issues
  • #22
Closed
Open
Created Mar 31, 2017 by Abhilash Raj@maxkingOwner

Usefulness of `self_link` in REST API responses

So, this comes after a long headache of why something obvious wasn't working when I was trying to deploy the mailman. The issue being when I ran the mailman core I used the following (relevant) configuration:

[webservice]
hostname: 0.0.0.0

This was so because I was deploying in a docker-container and didn't care what hostname was given to the container. Now, in another container I tried running postorius. But as soon as I would create a Domain, I would get a MailmanConnectionError which meant that postorius wasn't able to get to the core's REST API, which I knew for a fact was working/running properly. So, I tried out using the API using curl and got the following response for /domains/

{
    "entries": [
        {
            "description": "First mailman list.",
            "http_etag": "\"22b73b0e2235d711e3045613410e7fc3085515f1\"",
            "mail_host": "mail.araj.me",
            "self_link": "http://0.0.0.0:8001/3.1/domains/mail.araj.me"
        }
    ],
    "http_etag": "\"6429ae1bad947edd484270b8ef7aea3b88f7c952\"",
    "start": 0,
    "total_size": 1
}

Then it hit me that self_link is malformed and if client tries to access that URL, it would most definitely hit an error.

I don't know if using 0.0.0.0 is something wrong/uncommon to listen a server on, so I wanted to hear what others have to say on this.

Maybe we could just return a relative link in self_link and join with the already existing base_url for the API that client already knows about?

Assignee
Assign to
Time tracking