Static files: comment says the server falls back to disk when the cache cannot be allocated, but it returns 500
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c
- Domain
- backend, performance
Research direction
Read cwist_mem_init() and cwist_static_handler() in src/sys/app/app.c to compare the documented behavior with the NULL mem_manager handling. Decide whether the comment and log should describe the current 500 response or a disk fallback should be added. Done when the implementation and its comment and log agree.
Written by the indexing model from the issue text.
Description
Location: src/sys/app/app.c, cwist_mem_init() and cwist_static_handler().
Found by code reading on dev at 04ada5ffa; not reproduced with a running program.
cwist_mem_init() says "Serving still works: static files are then read from disk per request instead of from the in-memory cache (#341)" when app->mem_manager cannot be allocated. There is no such path: cwist_static_handler() answers every static request with 500 "Server memory not initialized" when mem_manager is NULL.
Expected: the comment and log line describe what happens (or a disk fallback exists).
- Dominant language
- C
- Stars
- 16
- Forks
- 7
- Avg merge
- 4h 56m
- Merged PRs (30d)
- 194
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from c4punks/CWIST
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
Similar issues
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
389ds/389-ds-base#8157 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
coolsnowwolf/lede#14305 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 2 days