Skip to content

[(HTTP)URLResponse] NSCoding implementation #711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 17, 2016

Conversation

naithar
Copy link
Contributor

@naithar naithar commented Nov 11, 2016

Implemented NSCoding protocol for URLResponse ant its subclass HTTPURLResponse.
Added tests.

Sergey Minakov and others added 3 commits November 11, 2016 11:06
[(HTTP)URLResponse] added NSCoding tests

[URLResponse] NSCoding implementation

[HTTPURLResponse] NSCoding implementation

[Test] Fix tests

[(HTPP)URLResponse] [Test] Tests now conform to macOS version
@naithar
Copy link
Contributor Author

naithar commented Nov 17, 2016

@parkera can you review this?

let responseA = URLResponse(url: url, mimeType: "txt", expectedContentLength: 0, textEncodingName: nil)
let responseB = NSKeyedUnarchiver.unarchiveObject(with: NSKeyedArchiver.archivedData(withRootObject: responseA)) as! URLResponse

//On macOS unarchived Archived then unarchived `URLResponse` is not equal.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is interesting and probably worth a bug for us.

@parkera
Copy link
Contributor

parkera commented Nov 17, 2016

Thanks @naithar!

@parkera
Copy link
Contributor

parkera commented Nov 17, 2016

@swift-ci please test and merge

@swift-ci swift-ci merged commit 7d680cd into swiftlang:master Nov 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants