Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[geometry] Meshcat's server returns 404 (not 200) on failures #20790

Merged

Conversation

jwnimmer-tri
Copy link
Collaborator

@jwnimmer-tri jwnimmer-tri commented Jan 17, 2024

Towards #19598.

Returning cacheable 200 responses with empty bodies is seriously misleading to the browser-side code.


This change is Reviewable

@jwnimmer-tri jwnimmer-tri added priority: medium release notes: fix This pull request contains fixes (no new features) labels Jan 17, 2024
@jwnimmer-tri
Copy link
Collaborator Author

+@SeanCurtis-TRI for feature review, please.

Copy link
Contributor

@SeanCurtis-TRI SeanCurtis-TRI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:LGTM:

It seems that this PR is predominantly introducing and apply the ReadFile functions. Neither the PR title nor the commit even hints at it.

+@sherm1 for platform review.

Reviewed 21 of 21 files at r1, all commit messages.
Reviewable status: LGTM missing from assignee sherm1(platform)

@jwnimmer-tri
Copy link
Collaborator Author

To my eye, "start to carve helper functions" at least hints at it. I guess I could add the new function name to the commit body on the next rebase, if you think it helps?

@jwnimmer-tri
Copy link
Collaborator Author

I found a lint error so I pushed a rebase anyway with a new note.

Copy link
Member

@sherm1 sherm1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup! There are a few CI errors. Platform :lgtm: pending CI

Reviewed 20 of 21 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: 1 unresolved discussion


geometry/meshcat_internal.h line 11 at r2 (raw file):

namespace internal {

/* Returns the static content for the given URL, or an nullopt when the URL is

typo: "an nullopt" -> "a nullopt"

This is also an opportunity to start to carve helper functions and
classes out into separate files for easier maintenance.

Two of the new functions are public and widely relevant: ReadFile and
ReadFileOrThrow.
@jwnimmer-tri jwnimmer-tri merged commit 72ece57 into RobotLocomotion:master Jan 18, 2024
10 checks passed
@jwnimmer-tri jwnimmer-tri deleted the meshcat-url-handling branch January 18, 2024 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium release notes: fix This pull request contains fixes (no new features)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants