mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-04-23 15:33:43 +00:00
2002-06-03 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWBundle.m: o use smartTakeValue:forKey: instead of takeValue:forKey: * GSWeb.framework/GSWAssociation.m: o use smartTakeValue:forKeyPath: instead of takeValue:forKeyPath: * GSWeb.framework/GSWComponent.m: o use smartTakeValue:forKey: instead of takeValue:forKey: * GSWeb.framework/GSWDisplayGroup.m: o changes in -description o logs * GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd: o added "reference" * GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html: o added "reference" * GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html: o added "reference" * GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.h/.m: o added "reference" * GSWExtensionsGSW.framework/GSWFileUploadComponent.h/.m: o bug fixes * GSWExtensionsGSW.framework/GSWFileUploadComponent.gswc/GSWFileUploadComponent.gswd: o added Height & With parameters for images * GSWExtensionsGSW.framework/GSWFileUploadComponent.gswc/GSWFileUploadComponent.html: o added delete check box title * GSWeb.framework/GSWElement.m: o logs * GSWeb.framework/GSWFileUpload.m: o logs * GSWeb.framework/GSWRequest.m: o bug fix for uploaded files git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@13762 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
962f79931c
commit
74a9ee8f16
19 changed files with 179 additions and 58 deletions
33
ChangeLog
33
ChangeLog
|
@ -1,4 +1,35 @@
|
|||
2002-05-xx Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
2002-06-03 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
* GSWeb.framework/GSWBundle.m:
|
||||
o use smartTakeValue:forKey: instead of takeValue:forKey:
|
||||
* GSWeb.framework/GSWAssociation.m:
|
||||
o use smartTakeValue:forKeyPath: instead of takeValue:forKeyPath:
|
||||
* GSWeb.framework/GSWComponent.m:
|
||||
o use smartTakeValue:forKey: instead of takeValue:forKey:
|
||||
* GSWeb.framework/GSWDisplayGroup.m:
|
||||
o changes in -description
|
||||
o logs
|
||||
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
|
||||
o added "reference"
|
||||
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
|
||||
o added "reference"
|
||||
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
|
||||
o added "reference"
|
||||
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.h/.m:
|
||||
o added "reference"
|
||||
* GSWExtensionsGSW.framework/GSWFileUploadComponent.h/.m:
|
||||
o bug fixes
|
||||
* GSWExtensionsGSW.framework/GSWFileUploadComponent.gswc/GSWFileUploadComponent.gswd:
|
||||
o added Height & With parameters for images
|
||||
* GSWExtensionsGSW.framework/GSWFileUploadComponent.gswc/GSWFileUploadComponent.html:
|
||||
o added delete check box title
|
||||
* GSWeb.framework/GSWElement.m:
|
||||
o logs
|
||||
* GSWeb.framework/GSWFileUpload.m:
|
||||
o logs
|
||||
* GSWeb.framework/GSWRequest.m:
|
||||
o bug fix for uploaded files
|
||||
|
||||
2002-05-16 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
* GSWeb.framework/GSWTextField.m:
|
||||
o added warning in _isFormattedValueInComponent:equalToFormattedValue:
|
||||
o added warning in takeValuesFromRequest:inContext:
|
||||
|
|
|
@ -25,6 +25,14 @@
|
|||
<PRE><gsweb name="ApplicationNameString"></gsweb></PRE>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" valign="top">
|
||||
<b>Reference:</b>
|
||||
</td>
|
||||
<td align="left" valign="top">
|
||||
<PRE><gsweb name="ReferenceString"></gsweb></PRE>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" valign="top">
|
||||
<b>Erreur:</b>
|
||||
|
|
|
@ -18,6 +18,13 @@ ApplicationNameString: GSWString
|
|||
escapeHTML = NO;
|
||||
}
|
||||
|
||||
ReferenceString: GSWString
|
||||
{
|
||||
value = referenceString;
|
||||
escapeHTML = YES;
|
||||
convertHTMLEntities = YES;
|
||||
}
|
||||
|
||||
ExceptionNameString: GSWString
|
||||
{
|
||||
value = exception.name;
|
||||
|
|
|
@ -25,6 +25,14 @@
|
|||
<PRE><gsweb name="ApplicationNameString"></gsweb></PRE>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" valign="top">
|
||||
<b>Reference:</b>
|
||||
</td>
|
||||
<td align="left" valign="top">
|
||||
<PRE><gsweb name="ReferenceString"></gsweb></PRE>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="RIGHT" Valign="MIDDLE">
|
||||
<b>Error:</b>
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
NSException* _exception;
|
||||
NSArray* _reasons;
|
||||
id _reference;
|
||||
};
|
||||
|
||||
-(void)dealloc;
|
||||
|
@ -42,6 +43,7 @@
|
|||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context;
|
||||
-(void)setException:(NSException*)exception;
|
||||
-(NSString*)referenceString;
|
||||
@end
|
||||
|
||||
#endif // _GSWExceptionPage_h__
|
||||
|
|
|
@ -42,6 +42,8 @@ static char rcsId[] = "$Id$";
|
|||
DESTROY(_exception);
|
||||
GSWLogC("Dealloc GSWExceptionPage reasons\n");
|
||||
DESTROY(_reasons);
|
||||
GSWLogC("Dealloc GSWExceptionPage reference\n");
|
||||
DESTROY(_reference);
|
||||
GSWLogC("Dealloc GSWExceptionPage super\n");
|
||||
[super dealloc];
|
||||
GSWLogC("Dealloc GSWExceptionPage end\n");
|
||||
|
@ -49,6 +51,10 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
-(void)awake
|
||||
{
|
||||
if (!_reference)
|
||||
{
|
||||
ASSIGN(_reference,[NSCalendarDate calendarDate]);
|
||||
}
|
||||
[super awake];
|
||||
};
|
||||
|
||||
|
@ -87,4 +93,9 @@ static char rcsId[] = "$Id$";
|
|||
else
|
||||
return _tmpUserInfoValue;
|
||||
}
|
||||
|
||||
-(NSString*)referenceString
|
||||
{
|
||||
return _reference;
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -29,12 +29,16 @@ ImageWithPath: GSWImage
|
|||
{
|
||||
filename = fileInfo.filePath;
|
||||
border = 0;
|
||||
width = ^imageWidth;
|
||||
height = ^imageHeight;
|
||||
};
|
||||
|
||||
ImageWithURL: GSWImage
|
||||
{
|
||||
src = fileInfo.fileURL;
|
||||
border = 0;
|
||||
width = ^imageWidth;
|
||||
height = ^imageHeight;
|
||||
};
|
||||
|
||||
UploadFile: GSWFileUpload
|
||||
|
@ -71,3 +75,8 @@ DeleteCheckBox: GSWCheckBox
|
|||
enabled=isDeleteEnabled;
|
||||
checked= fileInfo.isDeleted;
|
||||
};
|
||||
|
||||
DeleteCheckBoxTitle: GSWString
|
||||
{
|
||||
value = ^deleteCheckBoxText;
|
||||
};
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
</gsweb>
|
||||
</gsweb>
|
||||
</gsweb>
|
||||
<br>
|
||||
<gsweb name="UploadFile"></gsweb><br>
|
||||
<gsweb name="DeleteCondition">
|
||||
<gsweb name="DeleteCheckBox"></gsweb>
|
||||
<gsweb name="DeleteCheckBoxTitle"></gsweb><gsweb name="DeleteCheckBox"></gsweb>
|
||||
</gsweb>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
//====================================================================
|
||||
@interface GSWFileUploadComponent : GSWComponent
|
||||
{
|
||||
NSMutableDictionary* _fileInfo;
|
||||
NSMutableDictionary* _tmpFileInfo;
|
||||
};
|
||||
-(id)init;
|
||||
-(void)dealloc;
|
||||
|
|
|
@ -51,6 +51,7 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
LOGObjectFnStart();
|
||||
[super awake];
|
||||
_tmpFileInfo=nil;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
@ -58,6 +59,7 @@ static char rcsId[] = "$Id$";
|
|||
-(void)sleep
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
_tmpFileInfo=nil;
|
||||
[super sleep];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
@ -65,7 +67,6 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(_fileInfo);
|
||||
[super dealloc];
|
||||
};
|
||||
|
||||
|
@ -82,6 +83,7 @@ static char rcsId[] = "$Id$";
|
|||
[aResponse appendDebugCommentContentString:[[self fileInfo]description]];
|
||||
[super appendToResponse:aResponse
|
||||
inContext:aContext];
|
||||
_tmpFileInfo=nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -89,19 +91,20 @@ static char rcsId[] = "$Id$";
|
|||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"fileInfo %@",_fileInfo);
|
||||
NSDebugMLog(@"fileInfo %@",_tmpFileInfo);
|
||||
[super takeValuesFromRequest:aRequest
|
||||
inContext:aContext];
|
||||
NSDebugMLog(@"fileInfo.fileURL %@",[_fileInfo valueForKey:@"fileURL"]);
|
||||
NSDebugMLog(@"fileInfo.fileName %@",[_fileInfo valueForKey:@"fileName"]);
|
||||
NSDebugMLog(@"fileInfo.filePath %@",[_fileInfo valueForKey:@"filePath"]);
|
||||
NSDebugMLog(@"fileInfo.data %p",[_fileInfo valueForKey:@"data"]);
|
||||
NSDebugMLog(@"fileInfo.mimeType %@",[_fileInfo valueForKey:@"mimeType"]);
|
||||
NSDebugMLog(@"fileInfo.isDeleted %@",[_fileInfo valueForKey:@"isDeleted"]);
|
||||
if ([[_fileInfo valueForKey:@"data"]length]>0 || boolValueWithDefaultFor([_fileInfo valueForKey:@"isDeleted"],NO))
|
||||
[self setValue:_fileInfo
|
||||
NSDebugMLog(@"fileInfo.fileURL %@",[_tmpFileInfo valueForKey:@"fileURL"]);
|
||||
NSDebugMLog(@"fileInfo.fileName %@",[_tmpFileInfo valueForKey:@"fileName"]);
|
||||
NSDebugMLog(@"fileInfo.filePath %@",[_tmpFileInfo valueForKey:@"filePath"]);
|
||||
NSDebugMLog(@"fileInfo.data %p",[_tmpFileInfo valueForKey:@"data"]);
|
||||
NSDebugMLog(@"fileInfo.data length %d",(int)[[_tmpFileInfo valueForKey:@"data"] length]);
|
||||
NSDebugMLog(@"fileInfo.mimeType %@",[_tmpFileInfo valueForKey:@"mimeType"]);
|
||||
NSDebugMLog(@"fileInfo.isDeleted %@",[_tmpFileInfo valueForKey:@"isDeleted"]);
|
||||
if ([[_tmpFileInfo valueForKey:@"data"]length]>0 || boolValueWithDefaultFor([_tmpFileInfo valueForKey:@"isDeleted"],NO))
|
||||
[self setValue:_tmpFileInfo
|
||||
forBinding:@"fileInfo"];
|
||||
DESTROY(_fileInfo);
|
||||
_tmpFileInfo=nil;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
@ -109,17 +112,17 @@ static char rcsId[] = "$Id$";
|
|||
-(NSMutableDictionary*)fileInfo
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if (!_fileInfo)
|
||||
if (!_tmpFileInfo)
|
||||
{
|
||||
if ([self hasBinding:@"fileInfo"])
|
||||
{
|
||||
_fileInfo=[[self valueForBinding:@"fileInfo"] mutableCopy];
|
||||
if (!_fileInfo)
|
||||
_fileInfo=[NSMutableDictionary new];
|
||||
_tmpFileInfo=[[[self valueForBinding:@"fileInfo"] mutableCopy] autorelease];
|
||||
if (!_tmpFileInfo)
|
||||
_tmpFileInfo=(NSMutableDictionary*)[NSMutableDictionary dictionary];
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return _fileInfo;
|
||||
return _tmpFileInfo;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -763,7 +763,7 @@ static NSMutableArray* associationsLogsHandlerClasses=nil;
|
|||
if (keyPath)
|
||||
{
|
||||
#if GDL2
|
||||
[object takeValue:value
|
||||
[object smartTakeValue:value
|
||||
forKeyPath:keyPath];
|
||||
#else
|
||||
NSMutableArray* keys=[[keyPath_ componentsSeparatedByString:@"."] mutableCopy];
|
||||
|
|
|
@ -402,7 +402,7 @@ objectForReference:(NSString*)keyPath
|
|||
variableValue,
|
||||
variableValue,
|
||||
[variableValue retainCount]);
|
||||
[object_ takeValue:variableValue
|
||||
[object_ smartTakeValue:variableValue
|
||||
forKey:variableName];
|
||||
NSDebugMLLog(@"bundles",@"AFT variableValue %p:%@ [RC=%d]",
|
||||
variableValue,
|
||||
|
|
|
@ -430,8 +430,13 @@ associationsKeys:(NSArray*)associationsKeys
|
|||
inComponent:self];
|
||||
/*//MGNEW [self setIVarNamed:aKey
|
||||
withValue:aValue];*/
|
||||
#if GDL2 // GDL2 implementation
|
||||
[self smartTakeValue:aValue
|
||||
forKey:aKey];
|
||||
#else
|
||||
[self takeValue:aValue
|
||||
forKey:aKey];
|
||||
#endif
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -838,7 +843,7 @@ associationsKeys:(NSArray*)associationsKeys
|
|||
{
|
||||
NS_DURING
|
||||
{
|
||||
[self takeValue:value_
|
||||
[self smartTakeValue:value_
|
||||
forKey:parentBindingName_];
|
||||
}
|
||||
NS_HANDLER;
|
||||
|
|
|
@ -135,37 +135,51 @@ Description: <EOKeyValueUnarchiver: 0x1a84d20>
|
|||
|
||||
-(NSString*)description
|
||||
{
|
||||
NSString* _dscr=nil;
|
||||
NSString* dscr=nil;
|
||||
GSWLogAssertGood(self);
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"GSWDisplayGroup description Self=%p",self);
|
||||
_dscr=[NSString stringWithFormat:@"<%s %p - \n",
|
||||
object_get_class_name(self),
|
||||
(void*)self];
|
||||
dscr=[NSString stringWithFormat:@"<%s %p - \n",
|
||||
object_get_class_name(self),
|
||||
(void*)self];
|
||||
|
||||
_dscr=[_dscr stringByAppendingFormat:@"numberOfObjectsPerBatch:[%d]\n",
|
||||
_numberOfObjectsPerBatch];
|
||||
_dscr=[_dscr stringByAppendingFormat:@"fetchesOnLoad:[%s]\n",
|
||||
_flags.autoFetch ? "YES" : "NO"];
|
||||
_dscr=[_dscr stringByAppendingFormat:@"validatesChangesImmediately:[%s]\n",
|
||||
_flags.validateImmediately ? "YES" : "NO"];
|
||||
_dscr=[_dscr stringByAppendingFormat:@"selectsFirstObjectAfterFetch:[%s]\n",
|
||||
_flags.selectFirstObject ? "YES" : "NO"];
|
||||
_dscr=[_dscr stringByAppendingFormat:@"localKeys:[%@]\n",
|
||||
_localKeys];
|
||||
_dscr=[_dscr stringByAppendingFormat:@"dataSource:[%@]\n",
|
||||
_dataSource];
|
||||
_dscr=[_dscr stringByAppendingFormat:@"sortOrdering:[%@]\n",
|
||||
_sortOrdering];
|
||||
_dscr=[_dscr stringByAppendingFormat:@"qualifier:[%@]\n",
|
||||
_qualifier];
|
||||
_dscr=[_dscr stringByAppendingFormat:@"formatForLikeQualifier:[%@]\n",
|
||||
_defaultStringMatchFormat];
|
||||
_dscr=[_dscr stringByAppendingFormat:@"insertedObjectDefaultValues:[%@]\n",
|
||||
_insertedObjectDefaultValues];
|
||||
_dscr=[_dscr stringByAppendingFormat:@"queryOperator:[%@]\n",
|
||||
_queryOperator];
|
||||
|
||||
return _dscr;
|
||||
dscr=[dscr stringByAppendingFormat:@"numberOfObjectsPerBatch:[%d]\n",
|
||||
_numberOfObjectsPerBatch];
|
||||
dscr=[dscr stringByAppendingFormat:@"fetchesOnLoad:[%s]\n",
|
||||
_flags.autoFetch ? "YES" : "NO"];
|
||||
dscr=[dscr stringByAppendingFormat:@"validatesChangesImmediately:[%s]\n",
|
||||
_flags.validateImmediately ? "YES" : "NO"];
|
||||
dscr=[dscr stringByAppendingFormat:@"selectsFirstObjectAfterFetch:[%s]\n",
|
||||
_flags.selectFirstObject ? "YES" : "NO"];
|
||||
dscr=[dscr stringByAppendingFormat:@"localKeys:[%@]\n",
|
||||
_localKeys];
|
||||
dscr=[dscr stringByAppendingFormat:@"dataSource:[%@]\n",
|
||||
_dataSource];
|
||||
dscr=[dscr stringByAppendingFormat:@"sortOrdering:[%@]\n",
|
||||
_sortOrdering];
|
||||
dscr=[dscr stringByAppendingFormat:@"qualifier:[%@]\n",
|
||||
_qualifier];
|
||||
dscr=[dscr stringByAppendingFormat:@"formatForLikeQualifier:[%@]\n",
|
||||
_defaultStringMatchFormat];
|
||||
dscr=[dscr stringByAppendingFormat:@"insertedObjectDefaultValues:[%@]\n",
|
||||
_insertedObjectDefaultValues];
|
||||
dscr=[dscr stringByAppendingFormat:@"queryOperator:[%@]\n",
|
||||
_queryOperator];
|
||||
dscr=[dscr stringByAppendingFormat:@"queryMatch:[%@]\n",
|
||||
_queryMatch];
|
||||
dscr=[dscr stringByAppendingFormat:@"queryMin:[%@]\n",
|
||||
_queryMin];
|
||||
dscr=[dscr stringByAppendingFormat:@"queryMax:[%@]\n",
|
||||
_queryMax];
|
||||
dscr=[dscr stringByAppendingFormat:@"queryOperator:[%@]\n",
|
||||
_queryOperator];
|
||||
dscr=[dscr stringByAppendingFormat:@"defaultStringMatchOperator:[%@]\n",
|
||||
_defaultStringMatchOperator];
|
||||
dscr=[dscr stringByAppendingFormat:@"defaultStringMatchFormat:[%@]\n",
|
||||
_defaultStringMatchFormat];
|
||||
dscr=[dscr stringByAppendingFormat:@"queryBindings:[%@]\n",
|
||||
_queryBindings];
|
||||
dscr=[dscr stringByAppendingString:@">"];
|
||||
return dscr;
|
||||
};
|
||||
|
||||
|
||||
|
@ -1816,6 +1830,7 @@ self setSelectionIndexes:indexes of objects in objects? //ret 1
|
|||
ofObject:masterObject];
|
||||
if ([self fetchesOnLoad])
|
||||
{
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"will fetch");
|
||||
[self fetch];
|
||||
};
|
||||
};
|
||||
|
@ -1844,6 +1859,7 @@ self setSelectionIndexes:indexes of objects in objects? //ret 1
|
|||
//self selectedObjects
|
||||
// self updateDisplayedObjects
|
||||
NSDebugMLog(@"objects=%@",objects);
|
||||
|
||||
[_allObjects removeAllObjects];
|
||||
[_allObjects addObjectsFromArray:objects];
|
||||
|
||||
|
@ -2053,6 +2069,7 @@ STOP ?
|
|||
else
|
||||
{
|
||||
_batchIndex = [self batchCount];
|
||||
NSDebugMLog(@"_batchIndex=%d",_batchIndex);
|
||||
[self displayNextBatch];
|
||||
}
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ extern BYTE ElementsMap_attributeElement;
|
|||
#endif
|
||||
|
||||
-(NSString*)definitionName;
|
||||
-(void)setDefinitionName:(NSString*)definitionName;
|
||||
@end
|
||||
|
||||
#ifdef NDEBBUG
|
||||
|
|
|
@ -60,20 +60,22 @@ BYTE ElementsMap_attributeElement = (BYTE)0x41;
|
|||
line:(int)line
|
||||
{
|
||||
LOGObjectFnStartC("GSWElement");
|
||||
NSDebugMLog(@"In Object %p Class %@ definitionName=%@ _appendToResponseElementID=%@ [_appendToResponseElementID length]=%d",
|
||||
/* NSDebugMLog(@"In Object %p Class %@ definitionName=%@ _appendToResponseElementID=%@ [_appendToResponseElementID length]=%d",
|
||||
self,
|
||||
[self class],
|
||||
[self definitionName],
|
||||
_appendToResponseElementID,[_appendToResponseElementID length]);
|
||||
*/
|
||||
[self assertIsElementIDInContext:context
|
||||
method:method
|
||||
file:file
|
||||
line:line];
|
||||
NSDebugMLog(@"In Object %p Class %@ definitionName=%@ _appendToResponseElementID=%@ [_appendToResponseElementID length]=%d",
|
||||
/* NSDebugMLog(@"In Object %p Class %@ definitionName=%@ _appendToResponseElementID=%@ [_appendToResponseElementID length]=%d",
|
||||
self,
|
||||
[self class],
|
||||
[self definitionName],
|
||||
_appendToResponseElementID,[_appendToResponseElementID length]);
|
||||
*/
|
||||
if ([_appendToResponseElementID length]>0)
|
||||
{
|
||||
NSString* elementID=[context elementID];
|
||||
|
@ -116,10 +118,11 @@ BYTE ElementsMap_attributeElement = (BYTE)0x41;
|
|||
line:(int)line
|
||||
{
|
||||
LOGObjectFnStartC("GSWElement");
|
||||
NSDebugMLog(@"self=%p definitionName=%@ _appendToResponseElementID=%@ %p / [context elementID]=%@",
|
||||
/* NSDebugMLog(@"self=%p definitionName=%@ _appendToResponseElementID=%@ %p / [context elementID]=%@",
|
||||
self,
|
||||
[self definitionName],
|
||||
_appendToResponseElementID,_appendToResponseElementID,[context elementID]);
|
||||
*/
|
||||
if (_appendToResponseElementID && [_appendToResponseElementID length]==0 && [[context elementID] length]>0)
|
||||
{
|
||||
NSString* msg=[NSString stringWithFormat:@"In Object %p Class %@ definitionName=%@ (file %s line %d), in %@ _appendToResponseElementID '%@' (%p) is not set",
|
||||
|
|
|
@ -145,8 +145,8 @@ static char rcsId[] = "$Id$";
|
|||
if (fileDatasCount==1)
|
||||
{
|
||||
dataValue=[fileDatas objectAtIndex:0];
|
||||
NSDebugMLLog(@"gswdync",@"dataValue (class=%@)=%@",
|
||||
[dataValue class],dataValue);
|
||||
NSDebugMLLog(@"gswdync",@"dataValue %p (class=%@)=%@",
|
||||
dataValue,[dataValue class],dataValue);
|
||||
if (dataValue)
|
||||
{
|
||||
if ([dataValue isKindOfClass:[NSData class]])
|
||||
|
@ -161,12 +161,16 @@ static char rcsId[] = "$Id$";
|
|||
if ([dataValue isKindOfClass:[NSString class]] && [dataValue length]==0)
|
||||
{
|
||||
LOGError(@"No Data: %@",dataValue);
|
||||
NSDebugMLLog(@"gswdync",@"No Data: %p (class=%@)=%@",
|
||||
dataValue,[dataValue class],dataValue);
|
||||
dataValue=nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"content type request : %@",[request _contentType]);
|
||||
NSLog(@"data class = %@",NSStringFromClass([dataValue class]));
|
||||
NSDebugMLLog(@"gswdync",@"??Data: %p (class=%@)=%@",
|
||||
dataValue,[dataValue class],dataValue);
|
||||
/*if (![dataValue isMemberOfClass:[NSString class]]) {
|
||||
ExceptionRaise(@"GSWFileUpload",
|
||||
@"GSWFileUpload: bad data :%@",
|
||||
|
|
|
@ -378,6 +378,7 @@ static char rcsId[] = "$Id$";
|
|||
else
|
||||
{
|
||||
//TODO
|
||||
thisOne=YES;//??
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1390,17 +1390,27 @@ method=%@, uri=%@, httpVersion=%@, headers=%@, content=%@, userInfo=%@, defaultF
|
|||
if (!_headersEnd)
|
||||
{
|
||||
//TODO error
|
||||
NSDebugMLog(@"Error");
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDebugMLLog(@"requests",@"i=%d",i);
|
||||
NSDebugMLLog(@"requests",@"i=%d _dataLength=%d _dataLength-i=%d",i,_dataLength,(_dataLength-i));
|
||||
_data=[data_ subdataWithRange:NSMakeRange(i,_dataLength-i)];
|
||||
//I'm not sure this is good but it avoid 2 bytes datas on an empty input type=file located t the end of the request)
|
||||
//It may be better to deal with this few lines up, around (_headersEnd=YES;)
|
||||
|
||||
if ([_data length]==2)
|
||||
{
|
||||
const unsigned char* _bytes=(unsigned char*)[_data bytes];
|
||||
if (_bytes[0]=='\r' && _bytes[1]=='\n')
|
||||
_data=[NSData data];
|
||||
};
|
||||
};
|
||||
_headers=[NSDictionary dictionaryWithDictionary:_headers];
|
||||
_parsedData=[NSArray arrayWithObjects:_headers,_data,nil];
|
||||
NSDebugMLLog(@"requests",@"_headers=%@",_headers);
|
||||
NSDebugMLLog(@"requests",@"_data=%@",_data);
|
||||
NSDebugMLLog(@"requests",@"_parsedData=%@",_parsedData);
|
||||
NSDebugMLLog(@"requests",@"_data %p (length=%d)=%@",_data,[_data length],_data);
|
||||
NSDebugMLLog(@"requests",@"_parsedData %p =%@",_parsedData,_parsedData);
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return _parsedData;
|
||||
|
|
Loading…
Reference in a new issue