Bug: SourceURL() hardcodes https:// breaking AllowHTTP mode #1
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/pixa#1
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
ImageRequest.SourceURL()ininternal/imgcache/imgcache.goalways prependshttps://:When
AllowHTTPis configured (for testing), the fetcher validates the URL scheme and the HTTP fetcher creates the request, but the source URL is alwayshttps://. This means in testing mode with HTTP-only test servers, fetches will either fail with TLS errors or connect to the wrong port.The
AllowHTTPconfig is set butSourceURL()has no awareness of it, making the entireAllowHTTPfeature broken for any real HTTP upstream.Impact
Blocks testing with local HTTP servers. The
AllowHTTPconfig option is effectively non-functional for the image proxy pipeline.Fix
Pass the scheme through
ImageRequestor add a method parameter. The cleanest approach is to add aSchemefield toImageRequestthat defaults tohttpsbut can be set tohttpwhenAllowHTTPis true.