[ckan-changes] [ckan/ckan] ac3338: [#2845] Hook can_handle_request methods to the act...

GitHub noreply at github.com
Fri Feb 26 15:01:26 UTC 2016


  Branch: refs/heads/2845-wsgi-dispatcher
  Home:   https://github.com/ckan/ckan
  Commit: ac333805d152572d71ddfe5c97840d4b2ab88a83
      https://github.com/ckan/ckan/commit/ac333805d152572d71ddfe5c97840d4b2ab88a83
  Author: amercader <amercadero at gmail.com>
  Date:   2016-02-26 (Fri, 26 Feb 2016)

  Changed paths:
    M ckan/config/middleware.py
    M ckan/controllers/partyline.py

  Log Message:
  -----------
  [#2845] Hook can_handle_request methods to the actual route maps

Both for the Flask and Pylons apps, match the incoming request against
their own route mappers, and return the tuple (True, app_name) if they
can handle it. AskAppDispatcherMiddleware will ultimately decide who
handles the requests based on these answers.


  Commit: f0b2c87b03793ffbf039ed2574b19500723a956e
      https://github.com/ckan/ckan/commit/f0b2c87b03793ffbf039ed2574b19500723a956e
  Author: amercader <amercadero at gmail.com>
  Date:   2016-02-26 (Fri, 26 Feb 2016)

  Changed paths:
    M ckan/config/middleware.py
    M ckan/config/routing.py
    M ckan/controllers/partyline.py

  Log Message:
  -----------
  [#2485] Enforce order of precedence on request handler middleware

Enforce Flask Extension > Pylons Extension > Flask Core > Pylons Core

Pylons requests are marked core=True or core=False depending on whether
they were set up in core or by an extension. This information is passed
to the handler so it can prioritize which app to use.

TODO: It's still not clear how we will mark Flask routes as core or not,
it will depend on how we end up setting up routing


Compare: https://github.com/ckan/ckan/compare/f35b4ee4f290...f0b2c87b0379


More information about the ckan-changes mailing list