NSHTTPURLResponse.localizedStringForStatusCode out of date

Originator:DaNmarner
Number:rdar://21114301 Date Originated:May 26, 2015
Status:Open Resolved:
Product:iOS/OS X SDK Product Version:All versions
Classification: Reproducible:Always
 
Summary:
NSHTTPURLResponse.localizedStringForStatusCode is returning descriptions of HTTP status code as specified in RFC2616 -- the HTTP/1.1 standard. That RFC, however, has been updated in 2012 to include several new status code in RFC6585. These codes are not being returned by the NSHTTPURLResponse API.

Steps to Reproduce:
call `NSHTTPURLResponse.localizedStringForStatusCode` with a status code specified in RFC6585. For example, paste the following in a playground

import Foundation
NSHTTPURLResponse.localizedStringForStatusCode(429)


Expected Results:
The return value should be a text description that matches RFC6585, following the sample code, the result value should be

"too many requests"



Actual Results:
The value is a generic description of the error code. Following the sample code, it is

"client error"

Version:
all

Notes:
Fixing this issue should be relatively easy.

Configuration:
All occurrence of this API on any platform.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!