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
Ben Copsey
2011-05-08 11:18:16 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a20c11879e94aab7140258e2b646e31868406a28
a20c1187
1 parent
39354fc5
Force defaultUserAgent into Latin1 (closes gh-176)
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
Classes/ASIHTTPRequest.m
Classes/ASIHTTPRequest.m
View file @
a20c118
...
...
@@ -24,7 +24,7 @@
#import "ASIDataCompressor.h"
// Automatically set on build
NSString
*
ASIHTTPRequestVersion
=
@"v1.8-7
6
2011-05-08"
;
NSString
*
ASIHTTPRequestVersion
=
@"v1.8-7
7
2011-05-08"
;
static
NSString
*
defaultUserAgent
=
nil
;
...
...
@@ -4142,10 +4142,15 @@ static NSOperationQueue *sharedQueue = nil;
if
(
!
appName
)
{
appName
=
[
bundle
objectForInfoDictionaryKey
:
@"CFBundleName"
];
}
NSData
*
latin1Data
=
[
appName
dataUsingEncoding
:
NSUTF8StringEncoding
];
appName
=
[[
NSString
alloc
]
initWithData
:
latin1Data
encoding
:
NSISOLatin1StringEncoding
];
// If we couldn't find one, we'll give up (and ASIHTTPRequest will use the standard CFNetwork user agent)
if
(
!
appName
)
{
return
nil
;
}
NSString
*
appVersion
=
nil
;
NSString
*
marketingVersionNumber
=
[
bundle
objectForInfoDictionaryKey
:
@"CFBundleShortVersionString"
];
NSString
*
developmentVersionNumber
=
[
bundle
objectForInfoDictionaryKey
:
@"CFBundleVersion"
];
...
...
Please
register
or
login
to post a comment