biasedbit / BBHTTP

A modern HTTP client framework for iOS/OSX built on top of libcurl.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple response headers not supported

vankeisb opened this issue · comments

The current BBHTTPResponse contract doesn't allow for multiple response headers. The property headers references a dictionary of NSString,NSString, so you can't set the same header several times.

For example, Set-Cookie might be present several times in the same response.

I'm used to Java, and there is this method in HttpServletResponse (the Java equivalent of BBHTTPResponse) :
http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletResponse.html#getHeaders(java.lang.String)

I have patched the lib in order to support that, and tried to keep backward compat.

I'll send a pull request ASAP.