瀏覽代碼

Compose percent-encoded query from percent-encoded components

Oleh Sannikov 11 年之前
父節點
當前提交
3cc61a5299
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Source/Alamofire.swift

+ 1 - 1
Source/Alamofire.swift

@@ -106,7 +106,7 @@ public enum ParameterEncoding {
             let method = Method(rawValue: mutableURLRequest.HTTPMethod)
             if method != nil && encodesParametersInURL(method!) {
                 if let URLComponents = NSURLComponents(URL: mutableURLRequest.URL!, resolvingAgainstBaseURL: false) {
-                    URLComponents.percentEncodedQuery = (URLComponents.query != nil ? URLComponents.query! + "&" : "") + query(parameters!)
+                    URLComponents.percentEncodedQuery = (URLComponents.percentEncodedQuery != nil ? URLComponents.percentEncodedQuery! + "&" : "") + query(parameters!)
                     mutableURLRequest.URL = URLComponents.URL
                 }
             } else {