php-http / client-common

Common HTTP Client implementations and tools for HTTPlug
http://httplug.io
MIT License
1.03k stars 54 forks source link

redirection to different domain must not keep previous port #221

Closed dbu closed 2 years ago

dbu commented 2 years ago
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixes #219
Documentation -
License MIT

What's in this PR?

Correctly handle non-absolute URLs in the redirect

Why?

Conform with RFC 7231 Location header specification

Checklist

dbu commented 2 years ago

@ostrolucky can you review this one please? trying to get all of the redirection right. i discovered that besides the domain/scheme/port topic, RFC 7231 also allows relative paths with all of the path semantics...

dbu commented 2 years ago

thanks for the feedback. i updated all points you discovered