fix(bdsmlr): resolve blogs through the site API - #552
Merged
Conversation
bdsmlr.com is now a client-rendered SPA: {user}.bdsmlr.com redirects for
every handle, and /blog/<anything> returns a byte-identical 2.3 KB shell
for real, fake and deleted blogs alike, so no HTML marker could tell them
apart. Resolve through the SPA's own unauthenticated get-blog endpoint,
which returns a verdict plus full metadata in one request.
A deleted blog answers 410 "blog gone" — neither free nor backed by a
profile — so it returns an error rather than a verdict. Report the
canonical blog name, since a renamed blog still resolves under its old
handle. Drop the "." stripping, which silently rewrote the requested
handle into a different one.
(cherry picked from commit 4651b08)
Owner
|
@brunolm I tested this module and currently it returns status code 302, even though I tried to pass |
Collaborator
Author
|
@kaifcodec I'm not seeing that on my end. Are you sure you were on this branch and not
Live on this branch for me:
Every handle is an error on If it still fails after checking out the branch, I'm happy to just close this PR. |
Owner
|
Okay, I think maybe I was inside python's venv. Let me check real quick! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bdsmlr.com is now a client-rendered SPA, and no HTML marker can separate the cases:
Resolved through the SPA's own unauthenticated
get-blogendpoint instead, which returns a verdict plus full metadata in one request.Three details behind that:
.stripping is dropped; it silently rewrote the requested handle into a different one.Split out of #523; the file here is byte-identical to what was tested there, and
ruff/mypypass on this branch.