mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-04-23 15:33:43 +00:00
2003-04-19 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWAdaptors/Apache/mod_gsweb.c: o added debug logs * GSWAdaptors/common/GSWConfig.c: o added debug logs, removed duplicate pszParent string build * GSWAdaptors/common/GSWHTTPRequest.c: o logs git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@16484 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bf181167d1
commit
65c2807053
4 changed files with 25 additions and 9 deletions
|
@ -332,8 +332,14 @@ copyHeaders(request_rec *p_pRequestRec,
|
|||
for (i=0;i<headers_arr->nelts;i++)
|
||||
{
|
||||
if (headers[i].key)
|
||||
GSWHTTPRequest_AddHeader(p_pGSWHTTPRequest,
|
||||
headers[i].key,headers[i].val);
|
||||
{
|
||||
GSWHTTPRequest_AddHeader(p_pGSWHTTPRequest,
|
||||
headers[i].key,headers[i].val);
|
||||
#ifdef DEBUG
|
||||
GSWLog(GSW_DEBUG,pServerRec,"key=%s value=%s",
|
||||
headers[i].key,headers[i].val);
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
// Add server headers
|
||||
|
|
|
@ -312,7 +312,7 @@ GSWConfig_PropListHeadersToHeaders(GSWDict *p_pHeaders,
|
|||
{
|
||||
BOOL fOk=TRUE;
|
||||
char pszParents[4096]="";
|
||||
//Headers
|
||||
//Headers:
|
||||
// {
|
||||
// header1=1234;
|
||||
// header2=4567;
|
||||
|
@ -378,6 +378,7 @@ GSWConfig_PropListHeadersToHeaders(GSWDict *p_pHeaders,
|
|||
};
|
||||
PLRelease(propListHeadersNames);//Because it's a newly created proplist
|
||||
};
|
||||
|
||||
return fOk;
|
||||
};
|
||||
|
||||
|
@ -465,8 +466,10 @@ GSWConfig_PropListApplicationToApplication(GSWApp *p_pApp,
|
|||
free(p_pApp->pszName);
|
||||
}
|
||||
p_pApp->pszName=SafeStrdup(p_pszAppName);//We'll own the AppName
|
||||
// CanDump
|
||||
|
||||
sprintf(pszParents,"%s/%s",p_pszParents,p_pszAppName);
|
||||
|
||||
// CanDump
|
||||
pValueCanDump=GSWPropList_GetDictionaryEntry(p_propListApp,
|
||||
"canDump",
|
||||
pszParents,
|
||||
|
@ -545,7 +548,6 @@ GSWConfig_PropListApplicationToApplication(GSWApp *p_pApp,
|
|||
|
||||
{
|
||||
proplist_t propListHeaders=NULL;
|
||||
sprintf(pszParents,"%s/%s",p_pszParents,p_pszAppName);
|
||||
|
||||
propListHeaders =
|
||||
GSWPropList_GetDictionaryEntry(p_propListApp,
|
||||
|
@ -554,11 +556,12 @@ GSWConfig_PropListApplicationToApplication(GSWApp *p_pApp,
|
|||
FALSE,//No Error If Not Exists
|
||||
GSWPropList_TestDictionary,
|
||||
p_pLogServerData);
|
||||
sprintf(pszParents,"%s/%s",p_pszParents,p_pszAppName);
|
||||
|
||||
fOk=GSWConfig_PropListHeadersToHeaders(&p_pApp->stHeadersDict,
|
||||
propListHeaders,
|
||||
pszParents,
|
||||
p_pLogServerData);
|
||||
GSWDict_Log(&p_pApp->stHeadersDict,p_pLogServerData);
|
||||
};
|
||||
|
||||
//Instances
|
||||
|
@ -581,7 +584,6 @@ GSWConfig_PropListApplicationToApplication(GSWApp *p_pApp,
|
|||
|
||||
{
|
||||
proplist_t propListInstances=NULL;
|
||||
sprintf(pszParents,"%s/%s",p_pszParents,p_pszAppName);
|
||||
propListInstances =
|
||||
GSWPropList_GetDictionaryEntry(p_propListApp,
|
||||
"instances",
|
||||
|
@ -589,6 +591,7 @@ GSWConfig_PropListApplicationToApplication(GSWApp *p_pApp,
|
|||
TRUE,//Error If Not Exists
|
||||
GSWPropList_TestDictionary,
|
||||
p_pLogServerData);
|
||||
|
||||
if (propListInstances)
|
||||
{
|
||||
int iInstanceIndex=0;
|
||||
|
|
|
@ -272,7 +272,7 @@ GSWDict_AllKeys(GSWDict *p_pDict)
|
|||
static void GSWDict_LogStringElem(GSWDictElem *p_pElem,
|
||||
void *p_pLogServerData)
|
||||
{
|
||||
GSWLog(GSW_DEBUG,p_pLogServerData,"%s=%s",p_pElem->pszKey,p_pElem->pValue);
|
||||
GSWLog(GSW_DEBUG,p_pLogServerData,"%s=%s",p_pElem->pszKey,p_pElem->pValue);
|
||||
};
|
||||
|
||||
void GSWDict_Log(GSWDict *p_pDict,
|
||||
|
|
|
@ -181,12 +181,19 @@ GSWHTTPRequest_HTTPToAppRequest(GSWHTTPRequest *p_pHTTPRequest,
|
|||
strcat(p_pHTTPRequest->pszRequest,"\n");
|
||||
|
||||
// Add Application Headers
|
||||
#ifdef DEBUG
|
||||
GSWLog(GSW_INFO,p_pLogServerData,"App Specific Headers");
|
||||
GSWDict_Log(&pApp->stHeadersDict,p_pLogServerData);
|
||||
#endif
|
||||
GSWDict_PerformForAllElem(&pApp->stHeadersDict,
|
||||
GSWHTTPRequest_AddHeaderElem,
|
||||
(void*)p_pHTTPRequest);
|
||||
#ifdef DEBUG
|
||||
if (p_pHTTPRequest->pHeaders)
|
||||
GSWDict_Log(p_pHTTPRequest->pHeaders,p_pLogServerData);
|
||||
{
|
||||
GSWLog(GSW_INFO,p_pLogServerData,"HTTP Request Headers");
|
||||
GSWDict_Log(p_pHTTPRequest->pHeaders,p_pLogServerData);
|
||||
};
|
||||
#endif
|
||||
|
||||
GSWLog(GSW_INFO,p_pLogServerData,"App Request: %s",
|
||||
|
|
Loading…
Reference in a new issue