Author: rfm
Date: Sun Aug 30 19:12:02 2015
New Revision: 38959
URL: http://svn.gna.org/viewcvs/gnustep?rev=38959&view=rev
Log:
Use [NSURLRequest-setDebug:] if available
Modified:
libs/webservices/trunk/GWSService.m
Modified: libs/webservices/trunk/GWSService.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/webservices/trunk/GWSService.m?rev=38959&r1=38958&r2=38959&view=diff
==============================================================================
--- libs/webservices/trunk/GWSService.m (original)
+++ libs/webservices/trunk/GWSService.m Sun Aug 30 19:12:02 2015
@@ -43,6 +43,9 @@
static BOOL useIOThreads = NO;
static NSThread *ioThreads[IOTHREADS] = { 0 };
static NSUInteger ioRequests[IOTHREADS] = { 0 };
+#if defined(GNUSTEP)
+static BOOL requestDebug = NO;
+#endif
static inline void
threadAdd(NSThread **t)
@@ -127,6 +130,9 @@
@interface NSURLHandle (Debug)
- (void) setDebug: (BOOL)flag;
- (void) setReturnAll: (BOOL)flag;
+@end
+@interface NSURLRequest (Debug)
+- (void) setDebug: (BOOL)flag;
@end
#endif
@@ -939,6 +945,12 @@
}
}
[request setHTTPBody: toSend];
+#if defined(GNUSTEP)
+ if (YES == requestDebug)
+ {
+ [request setDebug: [self debug]];
+ }
+#endif
if (_connection != nil)
{
@@ -1020,6 +1032,10 @@
{
if (self == [GWSService class])
{
+#if defined(GNUSTEP)
+ requestDebug = [[NSMutableURLRequest class]
+ instancesRespondToSelector: @selector(setDebug:)];
+#endif
queueLock = [NSRecursiveLock new];
active = [NSMutableDictionary new];
queues = [NSMutableDictionary new];
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs