         guard let credential = credential else { return }
         switch type {
         case .basic:
-            let authStr = "\(credential.user ?? ""):\(credential.password ?? "")"
+            let user = credential.user?.replacingOccurrences(of: ":", with: "") ?? ""
+            let pass = credential.password ?? ""
+            let authStr = "\(user):\(pass)"
             if let base64Auth = authStr.data(using: .utf8)?.base64EncodedString() {
                 self.setValue("Basic \(base64Auth)", forHTTPHeaderField: "Authorization")
             }

        }
    }
    
    mutating func set(httoAcceptCharsets acceptCharsets: [Quality<String.Encoding>]) {
        self.setValue(nil, forHTTPHeaderField: "Accept-Charset")
        for charset in acceptCharsets.sorted(by: { $0.quality > $1.quality }) {
            self.addValue(charset.stringifed, forHTTPHeaderField: "Accept-Charset")

    }
}

public extension Sequence where Iterator.Element == UInt8 {
    func hexString() -> String {
        return self.map{String(format: "%02X", $0)}.joined()
    }
