Bug 181873 - [Curl] Wrong redirect with relative url when it happens from different host than original host.
Summary: [Curl] Wrong redirect with relative url when it happens from different host t...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Basuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-19 12:39 PST by Basuke Suzuki
Modified: 2018-01-23 17:11 PST (History)
9 users (show)

See Also:


Attachments
Fix (2.16 KB, patch)
2018-01-23 16:30 PST, Basuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Basuke Suzuki 2018-01-19 12:39:22 PST
Say initial request to host A is redirected to host B and that request is also redirected with relative url. It should be host B, but curl implementation send that to host A.
Comment 1 Basuke Suzuki 2018-01-19 12:40:27 PST
https://tools.ietf.org/html/rfc7231#section-7.1.2

> The field value consists of a single URI-reference.  When it has the
> form of a relative reference ([RFC3986], Section 4.2), the final
> value is computed by resolving it against the effective request URI
> ([RFC3986], Section 5).
Comment 2 Basuke Suzuki 2018-01-23 16:30:52 PST
Created attachment 332095 [details]
Fix
Comment 3 WebKit Commit Bot 2018-01-23 17:08:33 PST
Comment on attachment 332095 [details]
Fix

Clearing flags on attachment: 332095

Committed r227465: <https://trac.webkit.org/changeset/227465>
Comment 4 WebKit Commit Bot 2018-01-23 17:08:35 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2018-01-23 17:11:22 PST
<rdar://problem/36801831>