tarantool / tarantool/http

405 Method not allowed

Open
#86 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Lua
Stars
81
Forks
41
PR merge metrics
No merged PRs in 30d

Description

hi!
maybe it would be better to send '405 Method not allowed', if the path is present in route but method not allowed.
I explain.

local server = httpd.new('127.0.0.1', 8089)
server:route({ path = '/', method = 'GET' }, http.testRequest)

curl -X POST "http://127.0.0.1:8089/" -v
< HTTP/1.1 404 Not found

(https://tools.ietf.org/html/rfc7231#section-6.5.5)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the route matching and HTTP response handling exercised by the shown server:route configuration and the curl POST request to /. Trace how a matching path with a disallowed method is classified, then verify that the completed behavior distinguishes it from an unknown path using a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.