Skip to content

CROW_CATCHALL_ROUTE doesn't populate Host header, CROW_ROUTE does #1017

Open
@dusanx

Description

@dusanx

This is a bug report, followup on question I sent on gitter.

When I use

CROW_CATCHALL_ROUTE(app)([](const crow::request &req) {
	std::cout << "HOST " << std::endl;
	std::cout << req.get_header_value("Host") << std::endl;

"Host" is not found.

When I use the same in

CROW_ROUTE(app, "/test")([](const crow::request &req) {
	std::cout << "HOST " << std::endl;
	std::cout << req.get_header_value("Host") << std::endl;

"Host" exists and is properly populated.

Is there some quick and dirty workaround for this before it is fixed, since I need CROW_CATCHALL_ROUTE that has Host header?

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionThe viability / implementation of the issue is up for debate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions