Skip to content

media-type-form-p always (or almost) returns nil #8

@mooseyboots

Description

@mooseyboots

hi, i'm playing around with this to get it running, calling it against https://codeberg.org/swagger.v1.json.

one issue i ran into was form-data parameters for file uploads.

(media-type-form-p consumes-media-type) always returns nil, because it expects a full MIME type string, but consumes-media-type is a subtype string.

consumes-media-type is created like so: (when consumes-media-types (select-media-type consumes-media-types)).

but select-media-type takes a list of MIME types and returns a subtype. e.g. if handed ("multipart/form-data") it returns "form-data".

i wasn't sure if the error is that media-type-form-p should use say serapeum:string-suffix-p as the test function, or if select-media-type should return a full MIME type string rather than a subtype.

because media-type-form-p fails, there are functions getting/setting data in req-body, but there is no such variable defined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions