From 8384725b01de48b56732bbb5320d36faf8c2504e Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sat, 14 Mar 2020 02:48:37 -0500 Subject: [PATCH] Revert "Make sure POST body is properly URL-encoded" --- Frameworks/Account/Credentials/URLRequest+RSWeb.swift | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Frameworks/Account/Credentials/URLRequest+RSWeb.swift b/Frameworks/Account/Credentials/URLRequest+RSWeb.swift index 1717dc10f..1edd0ac8e 100755 --- a/Frameworks/Account/Credentials/URLRequest+RSWeb.swift +++ b/Frameworks/Account/Credentials/URLRequest+RSWeb.swift @@ -36,12 +36,8 @@ public extension URLRequest { case .readerBasic: setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type") httpMethod = "POST" - var postData = URLComponents() - postData.queryItems = [ - URLQueryItem(name: "Email", value: credentials.username), - URLQueryItem(name: "Passwd", value: credentials.secret) - ] - httpBody = postData.percentEncodedQuery?.data(using: .utf8) + let postData = "Email=\(credentials.username)&Passwd=\(credentials.secret)" + httpBody = postData.data(using: String.Encoding.utf8) case .readerAPIKey: let auth = "GoogleLogin auth=\(credentials.secret)" setValue(auth, forHTTPHeaderField: HTTPRequestHeader.authorization)