Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validating response #64

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

beniciojunior
Copy link

I'm using AFDownloadRequestOperation on my project, but when it receives 416 HTTP status (Requested Range Not Satisfiable), the success block is being called. So I created this fix: every time responseObject is accessed, it validates the response using the (default) responseSerializer, which checks acceptable HTTP status codes.

Adding to that, I removed + acceptableStatusCodes method that is not called on AFNetworking 2.0.

I hope this helps.

@brunokoga
Copy link

I had a similar issue (getting 403 from the server) and this fixed it.

So, thanks @beniciojunior 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants