Coder Social home page Coder Social logo

Handle unexpected HTTP verb about raxx HOT 6 CLOSED

lasseebert avatar lasseebert commented on June 12, 2024
Handle unexpected HTTP verb

from raxx.

Comments (6)

CrowdHailer avatar CrowdHailer commented on June 12, 2024 2

I think it should just send a default 501 response

The 501 (Not Implemented) status code indicates that the server does
not support the functionality required to fulfill the request. This
is the appropriate response when the server does not recognize the
request method and is not capable of supporting it for any resource. A 501 response is cacheable by default; i.e., unless otherwise
indicated by the method definition or explicit cache controls (see
Section 4.2.2 of [RFC7234]).

from raxx.

CrowdHailer avatar CrowdHailer commented on June 12, 2024 1

@lasseebert Fixed in Ace with this commit CrowdHailer/Ace@6a45644

Will release 0.18.7 soon

from raxx.

CrowdHailer avatar CrowdHailer commented on June 12, 2024

I don't have an answer ready for this issue.
These logs come from the parser in Ace, because each connection is isolated there is no harm in these logs but in that case they should not keep spamming your logs.

In my opinion there are two options here.

  1. have Ace automatically return a default 400 response for any parser failure, it currently does this for several other kinds of "bad request"
  2. expose these methods to the Raxx app and let user handle them as they want. This has problems because turning unknown methods to atoms opens up an attack vector to flood the atom table.

My preference is for 1 because it is simpler, and it handles the case you need right now.

from raxx.

lasseebert avatar lasseebert commented on June 12, 2024

@CrowdHailer 1. works for me too. I have not yet looked at Ace source code, but please let me know if you would like me to take a go on it ;)

from raxx.

CrowdHailer avatar CrowdHailer commented on June 12, 2024

from raxx.

lasseebert avatar lasseebert commented on June 12, 2024

Awesome, thanks!

from raxx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.