Skip to content

Bug - Location header ignored when no space follows the colon #1738

@3kbest

Description

@3kbest

What happened?

This behavior does not occur when using a standard Nginx + PHP-FPM setup—redirects work regardless of a space after the colon.

I notice this don't work.:

header("Location:".$_SERVER['REQUEST_URI']);
exit;

But this work:

header("Location: ".$_SERVER['REQUEST_URI']);
exit;

Expected:
Redirect honored regardless of space (RFC 7230 allows optional whitespace after “:”).

Build Type

Docker (Debian Bookworm)

Worker Mode

No

Operating System

GNU/Linux

CPU Architecture

x86_64

PHP configuration

n/a

Relevant log output

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions