Closed Bug 1574978 Opened 5 years ago Closed 5 years ago

paste.mozilla.org API endpoint returns URL with default base domain (dpaste.de)

Categories

(Websites :: paste.mozilla.org, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: sheehan, Assigned: afrank)

References

Details

In bug 1574977 I've been reviving mach paste for use with the new pastebin tool. I noticed that when querying the API, the returned URLs use the default dpaste.de as the base URL, instead of paste.mozilla.org. For example in my most recent post, the URL returned by the api is https://dpaste.de/93BwXE8h instead of https://paste.mozilla.org/93BwXE8h.

On this page in the documentation there is a mention of this problem - apparently the solution is to update the BASE_URL property to the correct value (https://paste.mozilla.org/).

Assignee: nobody → afrank

Sure thing, I can push that change out. Can you point me to the mach code so I can test the change (github username mozafrank)?

Flags: needinfo?(sheehan)

I'm still working on the mach code - the command was removed and referenced the old API endpoint. I'm rewriting for use with the new APIs.

You can test with curl quite easily:

$ cat some_file.txt | curl -F 'format=url' -F 'content=<-' https://paste.mozilla.org/api/
https://dpaste.de/mmvmSeHT
Flags: needinfo?(sheehan)

Perfect, thanks! I used that syntax to successfully deploy and test the fix:

$ cat some_file.txt | curl -F 'format=url' -F 'content=<-' https://paste.mozilla.org/api/
https://paste.mozilla.org/UfPy1okg
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

Excellent - thanks for the quick turnaround, Adam!

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.