Allow response to be specified in makefsdata script#3000
Merged
kilograham merged 3 commits intoJun 19, 2026
Conversation
lurch
reviewed
Jun 11, 2026
peterharperuk
commented
Jun 11, 2026
Currently the response contents are hardcoded. This prevents using the makefsdata script to implement a captive portal where we have to send a redirect when a 404 result would be returned. When loading file contents, look for a file with the same name with a "response" extension and use its contents for the response. We can then use this for the access point example which can then be simplified. Fixes raspberrypi#2646
Only return on zero contents if a .response file is found.
5d55c08 to
2794b1a
Compare
lurch
reviewed
Jun 11, 2026
Co-authored-by: Andrew Scheller <lurch@durge.org>
Contributor
Author
|
@kilograham There are a couple of example PR's that need this... |
kilograham
approved these changes
Jun 19, 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.
Currently the header contents are hardcoded.
This prevents using the makefsdata script to implement a captive portal as we have to send a redirect when a 404 result would be returned.
When loading file contents, look for a file with the same name with a "hdr" and use its contents for the header.
We can then use this for the access point example which can then be much simpler.
Fixes #2646