Skip to content

Flask: non-JSON input mappers, send_json_resp mappers and empty bodies #40

Closed

Description

@thorwhalen

Follow-ups from the review of the flask support (#39, PR for it): under framework='flask' (1) handle_raw_req, handle_binary_req and the form mapper read Bottle's request (request.body, request.files) and fail per request with a 500 whose text leaks the AttributeError; they should fail at build time or be ported; (2) a user output mapper made with @send_json_resp sets Bottle's response.content_type, so Flask answers text/html; (3) an empty or non-JSON body gives a 500 with werkzeug's text instead of a 400 InputError; (4) Bottle-only configs (plugins, enable_cors, publish_swagger, openapi_insecure) are refused for flask; supporting them (JWT plugin equivalent as a before_request hook, CORS) is the real work.

Activity

  1. thorwhalen commented on Oct 13, 2026

    @thorwhalen
    MemberAuthor

    Items 1-3 landed in #43; item 4 continues in #42.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions