Repository navigation
Fix encoding-type=url in file listings - #29
Merged
Merged
Conversation
get_list_xml's url_encode flag shadowed the url_encode() function it calls to apply EncodingType, so any listing that asked for encoding-type=url raised "TypeError: 'bool' object is not callable" and returned a 500. Only the file client was affected: the aioboto client passes url_encode=False and never reaches the call. Neuroglancer always sends encoding-type=url, so no file target could be browsed from it. Renamed the flag to encode_values, and added a listing test that asks for encoding-type=url on both a plain and a virtual-prefixed target. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
get_list_xml'surl_encodeflag shadowed theurl_encode()function it calls to applyEncodingType, so any listing that asked forencoding-type=urlraisedTypeError: 'bool' object is not callableand returned a 500:Only the file client was affected — the aioboto client passes
url_encode=False, so it never reaches the call. Neuroglancer always sendsencoding-type=url(getS3BucketListingin its S3 kvstore appends it unconditionally), so no file target could be browsed from it.Found while wiring Fileglancer's data links up to
virtual_prefix: the very first listing Neuroglancer makes 500s.Changes
encode_valuesand updated the one in-repo caller.encoding-type=urlagainst both a plain and a virtual-prefixed target, asserting the echoedEncodingTypeand the expected keys and common prefixes.Full suite passes (80).
@StephanPreibisch