`req:render({json = box.NULL})` doesn't work
Open
Beginner friendly
Nobody has claimed this yet.
bug
- Dominant language
- Lua
- Stars
- 81
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
I want to return null explicitly from my handler.
But there is a check in the code that prevents that:
https://github.com/tarantool/http/blob/9b73cab45c031dd658c718e60a69966336d6c73f/http/server.lua#L454
Seems it should be if type(opts.json) ~= 'nil' then
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start in http/server.lua at line 454, where the JSON option is checked during req:render. Reproduce req:render({json = box.NULL}) and verify that the handler can explicitly return JSON null without the option being rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100