Commit 7db5fb5
Allow response to be specified in makefsdata script (#3000)
* Allow response to be changed in makefsdata script
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 #2646
* Change .hdr file to .response
Only return on zero contents if a .response file is found.
* Apply suggestion from @lurch
Co-authored-by: Andrew Scheller <lurch@durge.org>
---------
Co-authored-by: Andrew Scheller <lurch@durge.org>1 parent 3ebd10c commit 7db5fb5
1 file changed
Lines changed: 28 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
42 | 52 | | |
43 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
44 | 59 | | |
45 | 60 | | |
46 | 61 | | |
| |||
64 | 79 | | |
65 | 80 | | |
66 | 81 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
71 | 85 | | |
72 | 86 | | |
73 | 87 | | |
| |||
85 | 99 | | |
86 | 100 | | |
87 | 101 | | |
| 102 | + | |
| 103 | + | |
88 | 104 | | |
89 | 105 | | |
90 | 106 | | |
| |||
0 commit comments