Skip to content

Header versioning allows jibberish #124

Closed
@mariovisic

Description

@mariovisic

Hi Guys

Currently when header versioning is enabled (even with the strict option) sending a request without a valid vendor string will result in the first version being matched.

On line #37 here the loop will not run if the Accept header doesn't match the string.
https://github.com/intridea/grape/blob/master/lib/grape/middleware/versioner/header.rb#L37

This doesn't seem like the correct behaviour to me. Would it be better to render a 404 instead? If so then i'll see about adding a failing test + patch to solve the problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions