Skip to content

[SR-3329] URLQueryItems are not getting encoded in to the URL #719

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
Dec 15, 2016

Conversation

saiHemak
Copy link
Contributor

No description provided.

@@ -1073,7 +1073,8 @@ CF_EXPORT CFArrayRef _CFURLComponentsCopyQueryItems(CFURLComponentsRef component
else {
valueString = CFSTR("");
}
CFTypeRef keys[] = {CFSTR("name"), CFSTR("value")};
CFStringRef name = CFSTR("name");
CFTypeRef keys[] = {name, CFSTR("value")};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To work-around SR-2462 compiler bug.

@pushkarnk
Copy link
Member

I'm just kicking off a test. Thanks.

@swift-ci please test

@saiHemak
Copy link
Contributor Author

The build passed successfully in the local environment .Looking in to the build failure

@parkera
Copy link
Contributor

parkera commented Nov 18, 2016

Test Case 'TestNSURLComponents.test_createURLWithComponents' started at 08:21:47.819
/home/buildnode/jenkins/workspace/swift-corelibs-foundation-PR-Linux/swift/utils/build-script-impl: line 252:  8657 Segmentation fault      "$@"
/home/buildnode/jenkins/workspace/swift-corelibs-foundation-PR-Linux/swift/utils/build-script: fatal error: command terminated with a non-zero exit status 139, aborting
Build step 'Execute shell' marked build as failure

@pushkarnk
Copy link
Member

pushkarnk commented Nov 23, 2016

We see a similar failure in #713 It again happens in the new test case

@parkera
Copy link
Contributor

parkera commented Nov 24, 2016

@swift-ci please test

@pushkarnk
Copy link
Member

A known libkqueue test failure. Triggering the tests again.

@swift-ci please test

@pushkarnk
Copy link
Member

@swift-ci please test

1 similar comment
@pushkarnk
Copy link
Member

@swift-ci please test

@naithar
Copy link
Contributor

naithar commented Dec 14, 2016

Since #713 also crashed the test with the same error, i checked this PR on my 16.04 local environment.

The issue seems to be in urlComponents.queryItems implementation. The exact lines that crashes is:

let entryName = oneEntry.object(forKey: "name"._cfObject) as! String
let entryValue = oneEntry.object(forKey: "value"._cfObject) as? String

After I changed this lines to:

let swiftEntry = oneEntry._swiftObject
let entryName = swiftEntry["name"] as! String
let entryValue = swiftEntry["value"] as? String

The issue seemed to be fixed and test performed without errors.

@saiHemak
Copy link
Contributor Author

@ naithar : Thanks for debugging ..I was still in process of recreating it as I don't have Ubuntu 16.0.4 ..

@pushkarnk
Copy link
Member

@swift-ci please test

@saiHemak
Copy link
Contributor Author

@naithar : Thanks again ..It seems the build is passing with your suggested changes .Please let me know if you want to create PR or shall I go ahead with this PR including your suggested changes too ..

@naithar
Copy link
Contributor

naithar commented Dec 15, 2016

@saiHemak you are welcome :) Feel free to use my suggested changes in this PR, i won't mind.

@saiHemak
Copy link
Contributor Author

@naithar : Thank you :)

@saiHemak
Copy link
Contributor Author

@parkera : Please review ..

@parkera
Copy link
Contributor

parkera commented Dec 15, 2016

Thanks!

@parkera
Copy link
Contributor

parkera commented Dec 15, 2016

@swift-ci test and merge

@swift-ci swift-ci merged commit 921e0d8 into swiftlang:master Dec 15, 2016
@saiHemak saiHemak deleted the nsurlqueryitem branch February 28, 2017 07:02
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.

5 participants