zendframework / zend-stratigility

Middleware for PHP built on top of PSR-7 and PSR-15
BSD 3-Clause "New" or "Revised" License
235 stars 57 forks source link

Avoid strtolower host #157

Closed snapshotpl closed 6 years ago

snapshotpl commented 6 years ago

Lowercased host is defined by psr-7 design:

    /**
     * Retrieve the host component of the URI.
     *
     * If no host is present, this method MUST return an empty string.
     *
     * The value returned MUST be normalized to lowercase, per RFC 3986
     * Section 3.2.2.
     *
     * @see http://tools.ietf.org/html/rfc3986#section-3.2.2
     * @return string The URI host.
     */
    public function getHost();
Rockstar04 commented 6 years ago

I'm not intimately familiar with Diactoros, but I don't see any case conversion on the host field in code, or any tests covering the conversion. Is this possibly covering a deficiency in Diactoros' implementation?

weierophinney commented 6 years ago

@Rockstar04 That's a bug in Diactoros, then! Could you open an issue on that project for me, please, linking to this one?

weierophinney commented 6 years ago

Thanks, @snapshotpl!

snapshotpl commented 6 years ago

@Rockstar04 good catch!