Make test write a large request, not just a small one.

This commit is contained in:
Richard Frith-Macdonald 2021-05-19 11:07:45 +01:00
parent 12c88716d0
commit 8d75688048

View file

@ -117,7 +117,15 @@ resourceDidFailLoadingWithReason: (NSString *)reason
* background and wait a bit
*/
[handle writeProperty: @"POST" forKey: GSHTTPPropertyMethodKey];
[handle writeData: [@"Hello" dataUsingEncoding: NSASCIIStringEncoding]];
NSData *d = [@"1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"
dataUsingEncoding: NSUTF8StringEncoding];
NSMutableData *m = AUTORELEASE([d mutableCopy]);
while ([m length] < 64 * 1024)
{
[m appendData: d];
}
[handle writeData: m];
[handle setReturnAll: YES];
[handle loadInBackground];
PASS([self status] == URLHandleClientDidBeginLoading,