Skip to content

Commit

Permalink
[Issue Alamofire#2] Removing Accept-Encoding from HTTP field value
Browse files Browse the repository at this point in the history
  • Loading branch information
mattt committed Jul 31, 2014
1 parent 6cc4eee commit 78a75ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Alamofire.swift
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public struct Alamofire {

lazy var defaultHeaders: [String: String] = {
// Accept-Language HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3
let acceptEncoding: String = "Accept-Encoding: gzip;q=1.0,compress;q=0.5"
let acceptEncoding: String = "gzip;q=1.0,compress;q=0.5"

// Accept-Language HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4
let acceptLanguage: String = {
Expand Down Expand Up @@ -368,7 +368,7 @@ public struct Alamofire {

self.downloadTaskDidWriteData?(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite)
}

func URLSession(session: NSURLSession!, downloadTask: NSURLSessionDownloadTask!, didResumeAtOffset fileOffset: Int64, expectedTotalBytes: Int64) {
if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate {
delegate.URLSession(session, downloadTask: downloadTask, didResumeAtOffset: fileOffset, expectedTotalBytes: expectedTotalBytes)
Expand Down Expand Up @@ -401,7 +401,7 @@ public struct Alamofire {
}

// MARK: -

class Request {
private let delegate: TaskDelegate

Expand Down Expand Up @@ -460,7 +460,7 @@ public struct Alamofire {
return (data, error)
}, completionHandler: completionHandler)
}

func response(priority: Int = DISPATCH_QUEUE_PRIORITY_DEFAULT, queue: dispatch_queue_t? = nil, serializer: (NSURLRequest, NSHTTPURLResponse?, NSData?, NSError?) -> (AnyObject?, NSError?), completionHandler: (NSURLRequest, NSHTTPURLResponse?, AnyObject?, NSError?) -> Void) -> Self {

dispatch_async(self.delegate.queue, {
Expand Down

0 comments on commit 78a75ed

Please sign in to comment.