Browse Source

Update to RFC 7230 & RFC 7231

Mattt Thompson 11 years ago
parent
commit
57d14bd78a
1 changed files with 4 additions and 4 deletions
  1. 4 4
      Source/Alamofire.swift

+ 4 - 4
Source/Alamofire.swift

@@ -28,7 +28,7 @@ public let AlamofireErrorDomain = "com.alamofire.error"
 /**
     HTTP method definitions.
 
-    See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
+    See http://tools.ietf.org/html/rfc7231#section-4.3
 */
 public enum Method: String {
     case OPTIONS = "OPTIONS"
@@ -217,10 +217,10 @@ public class Manager {
                 var configuration = NSURLSessionConfiguration.defaultSessionConfiguration()
 
                 configuration.HTTPAdditionalHeaders = {
-                    // Accept-Encoding HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3
+                    // Accept-Encoding HTTP Header; see http://tools.ietf.org/html/rfc7230#section-4.2.3
                     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
+                    // Accept-Language HTTP Header; see http://tools.ietf.org/html/rfc7231#section-5.3.5
                     let acceptLanguage: String = {
                         var components: [String] = []
                         for (index, languageCode) in enumerate(NSLocale.preferredLanguages() as [String]) {
@@ -234,7 +234,7 @@ public class Manager {
                         return join(",", components)
                     }()
 
-                    // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43
+                    // User-Agent Header; see http://tools.ietf.org/html/rfc7231#section-5.5.3
                     let userAgent: String = {
                         let info = NSBundle.mainBundle().infoDictionary
                         let executable: AnyObject = info[kCFBundleExecutableKey] ?? "Unknown"