Toggle navigation
Toggle navigation
This project
Loading...
Sign in
iOS
/
asi-http-request
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Sam Soffes
2010-08-29 16:03:46 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
Ben Copsey
2010-08-30 18:38:02 +0100
Commit
1c169868285ca22ba6ee34f179475b00551f798f
1c169868
1 parent
6c040145
Add accept as one of the desired headers to be passed through on redirects
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
Classes/ASIHTTPRequest.m
Classes/ASIHTTPRequest.m
View file @
1c16986
...
...
@@ -1886,10 +1886,13 @@ static NSOperationQueue *sharedQueue = nil;
// Perhaps there are other headers we should be preserving, but it's hard to know what we need to keep and what to throw away.
NSString
*
userAgent
=
[[
self
requestHeaders
]
objectForKey
:
@"User-Agent"
];
NSString
*
accept
=
[[
self
requestHeaders
]
objectForKey
:
@"Accept"
];
[
self
setRequestHeaders
:
nil
];
if
(
userAgent
)
{
[
self
setRequestHeaders
:[
NSMutableDictionary
dictionaryWithObject
:
userAgent
forKey
:
@"User-Agent"
]];
}
else
{
[
self
setRequestHeaders
:
nil
];
[
self
addRequestHeader
:
@"User-Agent"
value
:
userAgent
];
}
if
(
accept
)
{
[
self
addRequestHeader
:
@"Accept"
value
:
accept
];
}
[
self
setHaveBuiltRequestHeaders
:
NO
];
}
else
{
...
...
Please
register
or
login
to post a comment