Repository navigation
Support HSDS 1.0 responses and request parsing - #135
Merged
Merged
Conversation
mattjala
force-pushed
the
hsds_1_0_compat_master
branch
from
September 24, 2026 15:04
23cbec2 to
ff2ff26
Compare
This was referenced Oct 1, 2026
- Accept "file" as well as "h5domain" when reading an external link's target domain; HSDS 1.0 reports it under "file". - Treat a layout object with no "class" as absent when parsing dataset creation properties, because HSDS 1.0 returns an empty layout for datasets with a NULL dataspace. - Send a single Content-Type header on point-selection writes. The generic header was added before the point-selection branch appended its own, and newer aiohttp versions reject the duplicate with a 400. - In CI, use Python 3.12 (HSDS now requires >= 3.11) and drop the requests==2.31.0 downgrade, because HSDS's pinned requests-unixsocket no longer needs it.
An http+unix:// endpoint only switched the connector into socket mode. The socket path was hardcoded to /tmp/hs/sn_1.sock, so a server on any other socket was silently bypassed in favor of whatever listened there. Requests were also built against a placeholder base URL of "0", and the socket was only configured from HSDS_ENDPOINT at init time, so an http+unix:// hs_endpoint in .hscfg never used a socket at all. Reading that endpoint from .hscfg also dereferenced a NULL base URL and kept a pointer into the line buffer that the next fgets call overwrote. The REST VOL now parses both endpoint sources the same way when connection information is set: percent-decode the socket path from the endpoint, set it on the cURL handle (clearing it for TCP endpoints), and send requests to http://localhost. Socket endpoints that are not percent-encoded are rejected.
…cfg line File objects were allocated without zeroing, and connection info only fills in a username and password when credentials are given. Without credentials, RV_file_close freed uninitialized pointers, so a failed H5Fopen/H5Fcreate segfaulted instead of returning an error. The cleanup also ran before the object was marked as a file when setting connection info failed. Zero file objects and set the fields RV_file_close relies on before anything can fail. Object visiting and attribute iteration on a file copied its username and password with strlen, which crashed on a file opened without credentials. Only copy them when they are set. RV_calloc mapped to RV_malloc_debug when memory tracking was enabled, so it did not zero memory in that configuration. A blank line in .hscfg made strtok return NULL, which was then passed to strcmp. Skip lines without a key.
mattjala
force-pushed
the
hsds_1_0_compat_master
branch
from
October 5, 2026 14:31
ff2ff26 to
3180536
Compare
| /* Instruct cURL on which type of transfer to perform, binary or JSON. Point selections | ||
| * are always sent as a JSON body, so their Content-Type header is set below instead. | ||
| */ | ||
| if (H5S_SEL_POINTS != sel_type) |
Collaborator
There was a problem hiding this comment.
Why is this change needed? is_transfer_binary should have already been set above according to checking for H5S_SEL_POINTS, so the content-type should already be getting set to application/json
Collaborator
Author
There was a problem hiding this comment.
This change was in order to avoid an issue where the point-selection branch would, later on, add a duplication application/json header that HSDS 1.0 rejects. That said, this can probably be handled more cleanly by keeping the unconditional one here and removing the other instance.
jhendersonHDF
approved these changes
Oct 5, 2026
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.
Depends on #134. That's currently folded into this branch to get it to pass CI.