Skip to content

Moving common implementation to NativeProtocol.swift #1389

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 1 commit into from
Jan 22, 2018

Conversation

saiHemak
Copy link
Contributor

@saiHemak saiHemak commented Jan 5, 2018

This PR is part of #1355 , moving the common implementation to NativeProtocol.

Along with the movement I had to implement a validateHeaderComplete method which basically checks whether the header is complete or not .However,in HTTP/0.9 , we received the body data before CURL tells us that the headers are complete and this behavior is specific to HTTP.
Hence ,I have moved the common code to NativeProtocol and overridden the specific behavior in HTTPURLProtocol.

/// `internalState` tracks the state of transfers / waiting for callbacks.
/// The `state` tracks the overall state of the task (running vs.
/// completed).
fileprivate var internalState: _InternalState {
Copy link
Contributor Author

@saiHemak saiHemak Jan 5, 2018

Choose a reason for hiding this comment

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

The property InternalState has been moved to NativeProtocol.The git diff is not showing properly and the code followed by the property is part of didReceve(headerData.

@saiHemak
Copy link
Contributor Author

saiHemak commented Jan 5, 2018

@alblue @pushkarnk please review

@pushkarnk
Copy link
Member

@swift-ci please test

@bhargavg bhargavg requested review from pushkarnk and removed request for pushkarnk January 12, 2018 06:34
@saiHemak
Copy link
Contributor Author

@ianpartridge @pushkarnk @alblue , Can you please review

@ianpartridge
Copy link
Contributor

@swift-ci please test and merge

@swift-ci swift-ci merged commit 3597807 into swiftlang:master Jan 22, 2018
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.

4 participants