Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Response code for redirect helper should use 307 (Temporary Redirect) instead of 302 (Found) #88

Closed
cwoloszynski opened this issue Dec 26, 2016 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@cwoloszynski
Copy link

cwoloszynski commented Dec 26, 2016

Bug

When using redirects and the helper function in HTTP/Models/Response/Response.swift:
public convenience init(headers: [HeaderKey: String] = [:], redirect location: String, permanently: Bool = false)

I noticed that the code uses .Found (302). I believe that the industry has moved from using 302 (which was ambiguous in its meeting) to TemporaryRedirect (307).

Can a change be made to change from:
let status: Status = permanently ? .movedPermanently : .found

to:
let status: Status = permanently ? .movedPermanently : .temporaryRedirect

@BrettRToomey BrettRToomey added this to the 2.0 milestone May 3, 2017
@tanner0101 tanner0101 added the enhancement New feature or request label May 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants