Giter Site home page Giter Site logo

cowmachine's Introduction

Test Dialyzer DocsGitHub release Crowdin Join the chat at https://gitter.im/zotonic/zotonic

Zotonic

Zotonic is the open source, high speed, real-time web framework and content management system, built with Erlang.

It is flexible, extensible and designed from the ground up to support dynamic, interactive websites and mobile solutions.

Zotonic is incredibly fast and wonderfully stable – suited for anything from basic websites to complex distributed applications. It offers an elegant backend for managing content with the flexibility that developers need to build truly amazing applications.

Installation

Documentation

You can find out more about Zotonic on http://zotonic.com, including:

Contributing

Zotonic is an open source project, made possible by the community. If you’d like to contribute, please read the Contributing chapter in the documentation.

If you encounter any issues, please report them in our issue tracker. If you discover any security-related issues, please contact us at [email protected].

License

Zotonic is released under the Apache 2.0 License. Please refer to the included LICENSE file for more information.

Thanks

Thanks to the following services for supporting Open Source:

cowmachine's People

Contributors

ddeboer avatar mmzeeman avatar mworrell avatar onnet avatar rustkas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cowmachine's Issues

Add test cases

We need test cases for whole requests with different test controllers.

Make controller_http_error configurable

Also test if controller_http_error exists.

Maybe provide a default controller in cowmachine and add a configuration to set an application specific error controller?

Publish action is broken

The publish action shows a repeating error:

Proceed? ("Y")> I didn't get that. This boolean kind of question.

And won't finish.

Check why cowboy sometimes responds with a 204 instead of a 500

When an error happens during responding, cowboy sometimes returns with a 204 response instead of the expected 500 response we are requesting.

Steps to reproduce..

Make a bad match in cowmachine_response:server_header/0, and check the server response in cowmachine_test:cowmachine_start_test/0

Wiki documentation. Controller-Functions

  • There is strange -spec description of known_methods (Another name for the function). It is very likely that this is a typo.
  • content_types_provided. The selected content type can be found with: cowmachine_req:resp_content_type(Context) instead of cowmachine_req:resp_content_type(Request).
  • charsets_provided. The selected character set can be found with: cowmachine_req:resp_chosen_charset(Context) instead of cowmachine_req:resp_chosen_charset(Request).

Crash with search param ?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000

In the logs I’m seeing a (silent) crash:

2022-01-04 00:26:07.698 [error] <0.26448.8> Cowboy stream 1 with ranch listener zotonic_https_listener_ipv4 
and connection process <0.26442.8> had its request process exit with reason: {nocatch,{stop_request,500,
{function_clause,[{cowmachine_util,parse_qs_name,[<<"=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000">>,[],<<>>],[
  {file,"/home/zotonic/zotonic/_build/default/lib/cowmachine/src/cowmachine_util.erl"},{line,284}]},
  {z_context,ensure_qs,1,[{file,"/home/zotonic/zotonic/apps/zotonic_core/src/support/z_context.erl"},{line,
  523}]},{z_cowmachine_middleware,'-execute/2-fun-0-',1,[{file,"/home/zotonic/zotonic/apps/zotonic_core/src/
  support/z_cowmachine_middleware.erl"},{line,54}]},{cowmachine_decision_core,...},...]}}} in 
  cowmachine_decision_core:handle_request/2 line 40

This is caused by search param ?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000 which is an easter egg in PHP applications - it is a common way to check if the server exposes sensitive data.

Publish this package to Hex

Currently, publishing to Hex fails because

cowboy, cowlib, mochiweb, parse_trans, ranch, sendfile

are not published on Hex.

  • I switched parse_trans to the Hex dep.
  • Removed sendfile (#2).
  • Cowboy, cowlib and ranch will be fine with Cowboy 2 is released.
  • Perhaps we should try to move away from Mochiweb (we only rely on some small parts of it anyway).

Make sure custom websocket handlers are loaded

Cowboy loads custom websocket handlers via cowboy_handler:execute/2 it calls an extra init export. Cowmachine can use custom websocket handlers, but it doesn't call the init/2 export of the handler. Therefore it will not automatically load the handler module. This leads to an initialization problem. You will only notice this when you need special websocket handlers.

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.