Commit graph

156 commits

Author SHA1 Message Date
Mattt Thompson
b43aba49fc Merge branch 'master' into lxcid-experimental-refined-stream
Conflicts:
	AFNetworking/AFHTTPClient.h
	AFNetworking/AFHTTPClient.m
2012-09-25 09:56:34 -07:00
Stan Chang Khin Boon
f032261cb8 This is a working version of multipart streaming.
- Fixed missing CRLF after header string.
 - Fixed not traversing through the buffer while reading.
 - Fixed content length of body stream are incorrect when attempts to finalize the multipart form data due to boundary settings not set yet.
 - Create a method named `setInitialAndFinalBoundaries` that attempts to reset all HTTP body parts boundary settings first before setting the initial and final boundaries.

Tested successfully on my own codes that does photo uploading to Flickr using `appendPartWithFileData:name:fileName:mimeType:`. I have not tried uploading from file URL but don't foresee any issue.
2012-09-25 03:33:51 +08:00
Blake Watters
3589d25652 Set _networkReachability to NULL after releasing. fixes AFNetworking/AFNetworking#529 2012-09-19 16:00:15 -04:00
Mattt Thompson
8c536f5f8d Refactoring macros for dispatch_release/retain fixes
Fixing macro for changed method signature for imp_implementationWithBlock(), which actually depends on Xcode version (and thus a check for either __IPHONE_6_0 or __MAC_10_8 to be defined,regardless of the deployment target
2012-09-17 11:53:49 -07:00
Benoit Bourdon
925c926a64 dispatch_retain & dispatch_release no longer needed with latest ARC 2012-09-15 12:41:58 +02:00
Mattt Thompson
501c4f18d4 [Issue #516] Removing setHTTPShouldHandleCookies:NO from AFHTTPClient 2012-09-14 13:53:18 -07:00
Mattt Thompson
ff37bb59f8 Merge branch 'master' into 1.0RC2
Conflicts:
	AFNetworking/AFHTTPClient.m
	AFNetworking/AFHTTPRequestOperation.m
	AFNetworking/AFJSONRequestOperation.m
	AFNetworking/AFNetworkActivityIndicatorManager.m
	AFNetworking/AFURLConnectionOperation.h
2012-09-14 10:30:25 -07:00
Mattt Thompson
c5ac49e5f9 Merge branch 'master' of github.com:AFNetworking/AFNetworking
Conflicts:
	AFNetworking/AFHTTPClient.m
2012-09-05 19:48:12 -07:00
Avi Itskovich
c5e450f4af Fix typo in multipart dir warning message 2012-09-04 17:32:00 -04:00
Stephan Diederich
e1dafd15ec fix warning
Xcode warns about a missing prototype which can
be fixed by making the (private) method static
2012-09-04 19:24:03 +02:00
Mattt Thompson
858c716c16 Re-indenting AFHTTPClient.m 2012-09-03 11:11:24 -07:00
Mike Lewis
b614dee5bb Removing setting Accept-Encoding by default.
NSURLConnection will set this to the supported formats which is a
superset of gzip. (at least in 5.1 it set deflate as well)
2012-08-31 23:29:11 -07:00
Mattt Thompson
ec0240f6e4 [Issue #489] Adding userInfo dictionary with current status in reachability changes 2012-08-31 09:04:54 -07:00
Mattt Thompson
5166d5af85 Specifying Mac OS X in User-Agent (/thanks @tewha) 2012-08-29 14:16:27 -07:00
Mattt Thompson
ebe06c227d Changing error domain for failure to recognize file URL in multipart form data builder 2012-08-29 12:25:53 -07:00
Mattt Thompson
730c35926a Improving default AFHTTPClient User-Agent strings 2012-08-29 11:57:25 -07:00
Mattt Thompson
e1995eae55 Significant refactoring and renaming of internal query string serialization functions. Query String parameter components are now pairs, comprised of a field and a corresponding value. 2012-08-29 10:49:55 -07:00
Mattt Thompson
bb8aee4a4f [Issue #444] Reducing number of legal characters to escape in query string parameters 2012-08-29 10:48:41 -07:00
Mattt Thompson
4717b66a49 Design is coming together, but something is off about the exact implementation 2012-08-23 16:21:14 -07:00
Mattt Thompson
910811a5e0 Stashing progress 2012-08-23 14:33:04 -07:00
Mattt Thompson
1c85deee36 Re-indenting and fixing method signature spacing 2012-08-23 10:16:43 -07:00
Mattt Thompson
72a85e1ee6 Renaming numberOfCompletedOperations variable in progress block to numberOfFinishedOperations 2012-08-22 11:32:59 -07:00
Mattt Thompson
706fbe473d [Issue #469] Optimizing calculation of finished operations in batch progress callback 2012-08-22 11:31:49 -07:00
Max Lansing
5a790360df merged multipart streaming thingy 2012-08-16 13:39:47 -07:00
Mattt Thompson
84abd71625 Issue #463 Adding #ifdef around AFHTTPClient copyWithZone: use of network reachability status block 2012-08-16 07:49:50 -07:00
Mattt Thompson
c7df7eacd5 Adding NSCoding and NSCopying conformance to AFHTTPClient 2012-08-15 10:22:07 -07:00
Mattt Thompson
782862bd6f [Issue #449] Fixing bug where tempfiles for multipart form message bodies could collide, specifically for requests with the same URL 2012-08-12 19:08:58 -04:00
Mattt Thompson
30e4b952b9 Merge pull request #452 from steipete/experimental-1.0RC2
don't use __weak for completionBlocks. (Issue #414)
2012-08-11 11:32:12 -07:00
Mattt Thompson
481033ae0c Minor code reformatting and inline documentation 2012-08-11 14:26:03 -04:00
Steven Fisher
f849627f9a initWithBaseURL
Fixes 446. If the URL passed into initWithBaseURL is a file URL rather
than a directory URL we will fix it.

Without this fix, if you provide "http://myhost/api" as a baseURL and
try to get "path", AFNetworking will get http://myhost/path instead of
http://myhost/api/path. With the fix, we'll change http://myhost/api to
http://myhost/api/.
2012-08-08 11:07:20 -07:00
Mattt Thompson
bff368c096 Using NSOperationQueueDefaultMaxConcurrentOperationCount rather than previously-specified constant (k=4) 2012-08-06 17:30:01 -04:00
Mattt Thompson
d02d9612dd Changing string format replacement tokens to suppress compiler warnings 2012-08-04 15:29:00 -04:00
Mattt Thompson
9ad76f02fc Merge branch 'experimental-1.0RC2' of github.com:AFNetworking/AFNetworking into experimental-1.0RC2 2012-08-04 15:25:28 -04:00
George Cox
2834ecc97d Changed string format specifiers for NSUInteger values from %u to %lu
Resolves two compiler warnings in AFHTTPRequestOperation.m and one in AFHTTPClient.m
2012-07-26 08:29:40 -04:00
Steven Fisher
69da97c5a8 Cast NSInteger to long.
Per Apple's Platform Dependencies in String Programming Guide, casting NSInteger to long before using %lu.

https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265-SW5
2012-07-23 11:05:58 -07:00
David Keegan
b46284860d String formatting changes wanted by Xcode4.5 on Mountain Lion 2012-07-21 23:00:53 -07:00
Max Lansing
c7f6fb09bf rejigger things to do callbacks and end-of-stream read properly 2012-07-19 22:23:38 -07:00
Peter Steinberger
fefd1a77ff don't use __weak for completionBlocks. (Issue #414)
We nil out the completionBlock manually in AFURLConnectionOperation. Using __weak here potentially doesn't call the set completion blocks.
Restores iOS4 compatibility. Also shortens inline ifs with a ternary conditional(?:).
2012-07-16 19:21:30 +02:00
Mattt Thompson
ae340b19e9 Removing whitespace leftover in dealloc from migration 2012-07-03 07:20:15 -07:00
Max Lansing
ced167f867 reimplemented multipart form data to use a body streaming object that aggregates file streams and in-memory data objects to compose the request body just in time. also trimmed the multipart form body public API and added CoreMobileServices framework to enable lookup of MIME type by file extension. 2012-06-30 16:32:11 -07:00
Max Lansing
5e90a17c76 merge before the storm 2012-06-30 16:21:24 -07:00
Mattt Thompson
605bbf1c28 [Issue #387] AFHTTPClient should setHTTPShouldHandleCookies:NO by default for requestWithMethod:path:parameters 2012-06-26 09:20:57 -07:00
Mattt Thompson
f1b3101a63 First pass at converting to ARC 2012-06-26 09:14:52 -07:00
Mattt Thompson
1cfa405957 Removing AFJSONUtilities in favor of just using NSJSONSerialization 2012-06-26 08:50:32 -07:00
Taeho Kim
61047bac76 Avoid AFHTTPClient adding an unnecessary parameter when constructing a multipart request with nil parameters. 2012-06-21 22:13:04 +09:00
Mattt Thompson
d1e993f1fd Merge pull request #376 from AFNetworking/experimental-default-http-pipelining
Automatically use HTTP pipelining for GET and HEAD requests in AFHTTPClient
2012-06-19 11:08:45 -07:00
Mattt Thompson
286b8100c5 [Issue #368] Checking for non-zero data length before attempting to append to write to output stream in multipart form data builder 2012-06-13 14:54:31 -07:00
Mattt Thompson
af99154694 Automatically use HTTP pipelining for GET and HEAD requests in AFHTTPClient 2012-06-13 14:44:46 -07:00
Max Lansing
7399eaa7cc close input buffer when creating multpart form from streaming nsurl 2012-06-12 23:13:55 -07:00
Max Lansing
d92462ef8c fixed zero-length appendData bug and added appendPartWithStreamingURL method 2012-06-12 22:46:39 -07:00