mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-04-25 00:11:46 +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
ebd0328cea
commit
d132a0842a
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++)
|
for (i=0;i<headers_arr->nelts;i++)
|
||||||
{
|
{
|
||||||
if (headers[i].key)
|
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
|
// Add server headers
|
||||||
|
|
|
@ -312,7 +312,7 @@ GSWConfig_PropListHeadersToHeaders(GSWDict *p_pHeaders,
|
||||||
{
|
{
|
||||||
BOOL fOk=TRUE;
|
BOOL fOk=TRUE;
|
||||||
char pszParents[4096]="";
|
char pszParents[4096]="";
|
||||||
//Headers
|
//Headers:
|
||||||
// {
|
// {
|
||||||
// header1=1234;
|
// header1=1234;
|
||||||
// header2=4567;
|
// header2=4567;
|
||||||
|
@ -378,6 +378,7 @@ GSWConfig_PropListHeadersToHeaders(GSWDict *p_pHeaders,
|
||||||
};
|
};
|
||||||
PLRelease(propListHeadersNames);//Because it's a newly created proplist
|
PLRelease(propListHeadersNames);//Because it's a newly created proplist
|
||||||
};
|
};
|
||||||
|
|
||||||
return fOk;
|
return fOk;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -465,8 +466,10 @@ GSWConfig_PropListApplicationToApplication(GSWApp *p_pApp,
|
||||||
free(p_pApp->pszName);
|
free(p_pApp->pszName);
|
||||||
}
|
}
|
||||||
p_pApp->pszName=SafeStrdup(p_pszAppName);//We'll own the AppName
|
p_pApp->pszName=SafeStrdup(p_pszAppName);//We'll own the AppName
|
||||||
// CanDump
|
|
||||||
sprintf(pszParents,"%s/%s",p_pszParents,p_pszAppName);
|
sprintf(pszParents,"%s/%s",p_pszParents,p_pszAppName);
|
||||||
|
|
||||||
|
// CanDump
|
||||||
pValueCanDump=GSWPropList_GetDictionaryEntry(p_propListApp,
|
pValueCanDump=GSWPropList_GetDictionaryEntry(p_propListApp,
|
||||||
"canDump",
|
"canDump",
|
||||||
pszParents,
|
pszParents,
|
||||||
|
@ -545,7 +548,6 @@ GSWConfig_PropListApplicationToApplication(GSWApp *p_pApp,
|
||||||
|
|
||||||
{
|
{
|
||||||
proplist_t propListHeaders=NULL;
|
proplist_t propListHeaders=NULL;
|
||||||
sprintf(pszParents,"%s/%s",p_pszParents,p_pszAppName);
|
|
||||||
|
|
||||||
propListHeaders =
|
propListHeaders =
|
||||||
GSWPropList_GetDictionaryEntry(p_propListApp,
|
GSWPropList_GetDictionaryEntry(p_propListApp,
|
||||||
|
@ -554,11 +556,12 @@ GSWConfig_PropListApplicationToApplication(GSWApp *p_pApp,
|
||||||
FALSE,//No Error If Not Exists
|
FALSE,//No Error If Not Exists
|
||||||
GSWPropList_TestDictionary,
|
GSWPropList_TestDictionary,
|
||||||
p_pLogServerData);
|
p_pLogServerData);
|
||||||
sprintf(pszParents,"%s/%s",p_pszParents,p_pszAppName);
|
|
||||||
fOk=GSWConfig_PropListHeadersToHeaders(&p_pApp->stHeadersDict,
|
fOk=GSWConfig_PropListHeadersToHeaders(&p_pApp->stHeadersDict,
|
||||||
propListHeaders,
|
propListHeaders,
|
||||||
pszParents,
|
pszParents,
|
||||||
p_pLogServerData);
|
p_pLogServerData);
|
||||||
|
GSWDict_Log(&p_pApp->stHeadersDict,p_pLogServerData);
|
||||||
};
|
};
|
||||||
|
|
||||||
//Instances
|
//Instances
|
||||||
|
@ -581,7 +584,6 @@ GSWConfig_PropListApplicationToApplication(GSWApp *p_pApp,
|
||||||
|
|
||||||
{
|
{
|
||||||
proplist_t propListInstances=NULL;
|
proplist_t propListInstances=NULL;
|
||||||
sprintf(pszParents,"%s/%s",p_pszParents,p_pszAppName);
|
|
||||||
propListInstances =
|
propListInstances =
|
||||||
GSWPropList_GetDictionaryEntry(p_propListApp,
|
GSWPropList_GetDictionaryEntry(p_propListApp,
|
||||||
"instances",
|
"instances",
|
||||||
|
@ -589,6 +591,7 @@ GSWConfig_PropListApplicationToApplication(GSWApp *p_pApp,
|
||||||
TRUE,//Error If Not Exists
|
TRUE,//Error If Not Exists
|
||||||
GSWPropList_TestDictionary,
|
GSWPropList_TestDictionary,
|
||||||
p_pLogServerData);
|
p_pLogServerData);
|
||||||
|
|
||||||
if (propListInstances)
|
if (propListInstances)
|
||||||
{
|
{
|
||||||
int iInstanceIndex=0;
|
int iInstanceIndex=0;
|
||||||
|
|
|
@ -272,7 +272,7 @@ GSWDict_AllKeys(GSWDict *p_pDict)
|
||||||
static void GSWDict_LogStringElem(GSWDictElem *p_pElem,
|
static void GSWDict_LogStringElem(GSWDictElem *p_pElem,
|
||||||
void *p_pLogServerData)
|
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,
|
void GSWDict_Log(GSWDict *p_pDict,
|
||||||
|
|
|
@ -181,12 +181,19 @@ GSWHTTPRequest_HTTPToAppRequest(GSWHTTPRequest *p_pHTTPRequest,
|
||||||
strcat(p_pHTTPRequest->pszRequest,"\n");
|
strcat(p_pHTTPRequest->pszRequest,"\n");
|
||||||
|
|
||||||
// Add Application Headers
|
// Add Application Headers
|
||||||
|
#ifdef DEBUG
|
||||||
|
GSWLog(GSW_INFO,p_pLogServerData,"App Specific Headers");
|
||||||
|
GSWDict_Log(&pApp->stHeadersDict,p_pLogServerData);
|
||||||
|
#endif
|
||||||
GSWDict_PerformForAllElem(&pApp->stHeadersDict,
|
GSWDict_PerformForAllElem(&pApp->stHeadersDict,
|
||||||
GSWHTTPRequest_AddHeaderElem,
|
GSWHTTPRequest_AddHeaderElem,
|
||||||
(void*)p_pHTTPRequest);
|
(void*)p_pHTTPRequest);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (p_pHTTPRequest->pHeaders)
|
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
|
#endif
|
||||||
|
|
||||||
GSWLog(GSW_INFO,p_pLogServerData,"App Request: %s",
|
GSWLog(GSW_INFO,p_pLogServerData,"App Request: %s",
|
||||||
|
|
Loading…
Reference in a new issue