Code Monkey home page Code Monkey logo

meowmeow's People

Contributors

0x50f13 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

meowmeow's Issues

[rules engine] Some clients seem to be not to provide `Host` header

Exception:

Error in process <0.495.0> on node 'MeowMeow@e28340418539' with exit value:
{{badkey,"Host"},
 [{erlang,map_get,
          ["Host",
           #{body => [],http_ver => <<"HTTP/1.0">>,method => <<"GET">>,
             route => <<"/nice%20ports%2C/Tri%6Eity.txt%2ebak">>,
             "body" => <<>>}],
          [{error_info,#{module => erl_erts_errors}}]},
  {access,get_rules_checked,4,[{file,"/buildroot/src/access.erl"},{line,79}]},
  {handle,handle,2,[{file,"/buildroot/src/handle.erl"},{line,184}]},
  {handle,handler,3,[{file,"/buildroot/src/handle.erl"},{line,251}]}]}

The following should be investigated:

  • Whether this is allowed in HTTP/1.0
    • If so whether do we need to support it
  • Definitely handle it by returning 400 Bad request

[logging] [optimization] Logger as separate process

The webserver produces a lot of debug messages which make request handling slower. As the code grows the amount of messages which are sent to logs also grows. So it might be beneficial in future to separate logging in another process in order to deliver response as fast as possible.

[rules engine] Incorrect handling of absent `Hosts` header

Describe the bug
When client does HTTP/1.0 request to server with Hosts handling configured the exception on server occurs.

To Reproduce
Any HTTP/1.0 request without Hosts header to MeowMeow server where Hosts handling is configured.

Expected behavior
No exception should occur.

OS & client (please complete the following information):
Unknown

Logs

=ERROR REPORT==== 9-Jul-2021::06:28:11.395303 ===
Error in process <0.1905.0> on node 'MeowMeow@ef6b9abe815b' with exit value:
{{badmatch,ok},
 [{handle,do_rules,2,[{file,"/buildroot/src/handle.erl"},{line,76}]},
  {handle,handle,2,[{file,"/buildroot/src/handle.erl"},{line,198}]},
  {handle,handler,3,[{file,"/buildroot/src/handle.erl"},{line,272}]}]}

[rules engine] `Default` rule cleans header

Describe the bug
When Default rule is used the headers are cleaned, and only Connection is sent. Thise leads to lack of Content-length header and so browser failing to finalize request correctly.

To Reproduce
In config apply Default rule to some route. Request this route through any client.

Expected behavior
The header MUST NOT be cleaned when using Default rule

OS & client (please complete the following information):

  • OS: Any
  • Client: Any
  • Client options(if applicable): N/A
  • Version: Any

GET parameters are not recognized

Server tries to handle get parameters as a file name, i.e. for /foo/bar?a=b it tries to find a file bar?a=b. Server should split get params and attach them to request record instead of attaching it to filename.

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.