Git Product home page Git Product logo

bobtail's People

Contributors

joegasewicz avatar kousikmitra avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

Forkers

kousikmitra

bobtail's Issues

[ERROR] Error handling request /favicon.ico

[21-04-23 20:13:10] GET / 200
[2023-04-21 20:13:10 +0100] [14073] [ERROR] Error handling request /favicon.ico
Traceback (most recent call last):
File "/home/joe/.local/share/virtualenvs/main_app-NxXa5jZN/lib/python3.11/site-packages/gunicorn/workers/sync.py", line 136, in handle
self.handle_request(listener, req, client, addr)
File "/home/joe/.local/share/virtualenvs/main_app-NxXa5jZN/lib/python3.11/site-packages/gunicorn/workers/sync.py", line 179, in handle_request
respiter = self.wsgi(environ, resp.start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/joe/.local/share/virtualenvs/main_app-NxXa5jZN/lib/python3.11/site-packages/bobtail/wsgi.py", line 126, in call
self._handle_route()
File "/home/joe/.local/share/virtualenvs/main_app-NxXa5jZN/lib/python3.11/site-packages/bobtail/wsgi.py", line 94, in _handle_route
self.parse_metadata = p.route()
^^^^^^^^^
File "/home/joe/.local/share/virtualenvs/main_app-NxXa5jZN/lib/python3.11/site-packages/bobtail/parser.py", line 125, in route
route = self._match()
^^^^^^^^^^^^^
File "/home/joe/.local/share/virtualenvs/main_app-NxXa5jZN/lib/python3.11/site-packages/bobtail/parser.py", line 60, in _match
if route_segment[0] != "{" and route_segment != path_segment:
~~~~~~~~~~~~~^^^
IndexError: string index out of range

AttributeError: 'BobTail' object has no attribute 'options'

  File "/home/joe/.local/share/virtualenvs/main_app-NxXa5jZN/lib/python3.11/site-packages/gunicorn/workers/sync.py", line 136, in handle
    self.handle_request(listener, req, client, addr)
  File "/home/joe/.local/share/virtualenvs/main_app-NxXa5jZN/lib/python3.11/site-packages/gunicorn/workers/sync.py", line 179, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/joe/.local/share/virtualenvs/main_app-NxXa5jZN/lib/python3.11/site-packages/bobtail/wsgi.py", line 124, in __call__
    self._init_response()
  File "/home/joe/.local/share/virtualenvs/main_app-NxXa5jZN/lib/python3.11/site-packages/bobtail/wsgi.py", line 71, in _init_response
    self.response = Response(self.options)
                             ^^^^^^^^^^^^
AttributeError: 'BobTail' object has no attribute 'options'

Doc strings

The doc strings need to be completed as many are missing / incomplete

  • I will keep this issue open until we get 100% doc coverage

Add methods to Request for birman

Examples using SQLAlchemy Core:

data = req.get_multipart_data()

ins = images.insert().values(
            user_id=int(data["user_id"]["value"]),
            file_name=data["logo"]["value"]["filename"],
            noticeboard_id=int(data["noticeboard_id"]["value"]),
        )

TypeError: 'NoneType' object is not subscriptable

Check if vars has been assigned

  File "/Users/joegasewicz/PycharmProjects/bobtail/bobtail/wsgi.py", line 91, in __call__
    self._handle_route()
  File "/Users/joegasewicz/PycharmProjects/bobtail/bobtail/wsgi.py", line 63, in _handle_route
    self.request.set_args(self.parse_metadata["vars"])

KeyError: 'CONTENT_TYPE'

  File "/home/joe/.local/share/virtualenvs/file_server-a96Bzucb/lib/python3.11/site-packages/gunicorn/workers/sync.py", line 136, in handle
    self.handle_request(listener, req, client, addr)
  File "/home/joe/.local/share/virtualenvs/file_server-a96Bzucb/lib/python3.11/site-packages/gunicorn/workers/sync.py", line 179, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/joe/.local/share/virtualenvs/file_server-a96Bzucb/lib/python3.11/site-packages/bobtail/wsgi.py", line 100, in __call__
    self.set_request()
  File "/home/joe/.local/share/virtualenvs/file_server-a96Bzucb/lib/python3.11/site-packages/bobtail/wsgi.py", line 53, in set_request
    headers=RequestHeaders(content_type=self.environ["CONTENT_TYPE"]),
                                        ~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'CONTENT_TYPE'

templating

This issue should add the following

  • A default templating engine that should be able to render html files and parse variables and some basic logic. An improved version should follow with full AST parsing.
  • Middleware for Jinja2 (https://github.com/joegasewicz/bobtail-jinja2)
  • Include security for string manipulation e.g CSRF
    Link issue #60

Should handle query params

foo://example.com:8042/over/there?name=ferret#nose
         \_/   \______________/\_________/ \_________/ \__/
          |           |            |            |        |
       scheme     authority       path        query   fragment
          |   _____________________|__
         / \ /                        \
         urn:example:animal:ferret:nose

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.