Skip to content
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

Crash / Bad Access with umlaut parameters in domain #464

Closed
cwack-letsdev opened this issue May 1, 2015 · 4 comments
Closed

Crash / Bad Access with umlaut parameters in domain #464

cwack-letsdev opened this issue May 1, 2015 · 4 comments

Comments

@cwack-letsdev
Copy link

Execution a request appending an umlaut parameter (äüö) occurs a BAD Access Exception in method:

private func URLRequest(method: Method, URL: URLStringConvertible) -> NSURLRequest {
at let mutableURLRequest = NSMutableURLRequest(URL: NSURL(string: URL.URLString)!)

@mattt
Copy link
Sponsor Contributor

mattt commented May 1, 2015

Can you post a code sample that reproduces this behavior?

@cwack-letsdev
Copy link
Author

I simply made an URL request with POST or even GET method.

e.g. url: http://www.domain.de/service.php?id=123&email=abcd@tür.de

@mattt
Copy link
Sponsor Contributor

mattt commented May 1, 2015

"http://www.domain.de/service.php?id=123&email=abcd@tür.de" is not a valid URL, as it needs to percent-encode the non-ASCII characters. This could be documented better.

Why not pass ["id": "123", "email": "abcd@tür.de"] as parameters? Alamofire will automatically escape that for you.

@mattt
Copy link
Sponsor Contributor

mattt commented May 2, 2015

eb4a945 documents the requirement for a URLString to conform to RFC 2396.

@mattt mattt closed this as completed May 2, 2015
mono0926 added a commit to ookamiinc/Alamofire that referenced this issue May 10, 2015
* master-original: (65 commits)
  Data task progress closures are now always called.
  Added response status code asssertions for redirect tests.
  Updated the Embedded Framework and Source File documentation.
  Fixed an expectation order issue in the redirect tests.
  Now only setting the operation queue's qualityOfService on iOS 8+.
  Removed commented out issue in the playground as it is no longer an issue.
  allow nil for prevent redirection
  Added an ignore flag for .DS_Store files and fixed up some spacing.
  Updated the deployment targets to iOS 8.0 and OS X 10.9.
  Update README.md
  Removing Travis CI build status until Xcode 6.3 is supported
  Updating docs to reference output stream, rather than specific OutputStreamType
  Fixing whitespace
  Fixing link to Code of Conduct
  [Issue Alamofire#464] Documenting requirements for URLString type
  Updating License
  Adding CONTRIBUTING.md
  Update LICENSE
  Updated the session delegate override closures to match the method signatures.
  Fixed some inaccurate docs on a few of the public delegate closures.
  ...
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

No branches or pull requests

2 participants