You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I print request.debugDescription from a multipart upload request (I'm guessing it doesn't matter what kind of request this is), I'm noticing duplicate fields:
Looking at the code, I'm guessing that perhaps by using NSObject as the dictionary key instead of something like String, we are putting different NSObjects in there (one from session.configuration.HTTPAdditionalHeaders and one from request.allHTTPHeaderFields), and the request-specific ones aren't overwriting the session-specific ones, as is the intention.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this @mrubin. We already have some tests put together around this use case, but not for MultipartFormData requests. I'll add one and see if I can get to the bottom of this.
Okay @mrubin, I've added a test in 53e25d5 that verifies the debugDescription on a Request works correctly even for MultipartFormData requests. At this point I'm going to close this issue out. If you could provide a sample project (or better yet, a test) that can reproduce the behavior you are seeing, then I'll be happy to re-open and investigate further.
When I print
request.debugDescription
from a multipart upload request (I'm guessing it doesn't matter what kind of request this is), I'm noticing duplicate fields:Looking at the code, I'm guessing that perhaps by using
NSObject
as the dictionary key instead of something likeString
, we are putting differentNSObject
s in there (one fromsession.configuration.HTTPAdditionalHeaders
and one fromrequest.allHTTPHeaderFields
), and the request-specific ones aren't overwriting the session-specific ones, as is the intention.The text was updated successfully, but these errors were encountered: