Skip to content

NSURLSession redirection handling broken #22

@TheDom

Description

@TheDom

We use AFNetworking and have code like the following

let httpSessionManager = AFHTTPSessionManager(baseURL: baseURL)
httpSessionManager.setTaskWillPerformHTTPRedirectionBlock { urlSession, task, response, request in
  return someCheck
    ? request
    : nil // Stop following redirect
}

After we integrated DBDebugToolkit we noticed that this block was not getting called anymore. Disabling networking logging via DBDebugToolkit.setNetworkRequestsLoggingEnabled(false) fixes the issue.

I looked at AFNetworking's related code (part 1, part 2) and it does not seem to do anything special which leads me to believe that this is a general issue.

Please let me know if additional information is needed to reproduce this behavior.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions