[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with debug_proc() and potential character translation issue



Hi Scott,

I am faced with two problems and I hope that you can enlighten me.

First problem:

The first problem is that debug_proc() is called for each character of a 
HTTP header (protocol data) when HTTP API receives a response message. 
That is quite "ugly" for me when I redirect the logger messages to 
Log4rpg.

I tried to fix that by buffering the data on my own and eventually call 
Log4rpg when I received a complete line. For that purpose I had to know 
the linefeed character used for protocol data. Hence I decided to 
translate a linefeed character from job ccsid to the ccsid of the protocol 
data to test the debug data for LF. That however led me to the second 
problem.

Second problem:

Since CommTcp_read() and its SSL equivalent are called for protocoll and 
post data I cannot know for sure the CCSID of the data that is passed to 
the debug_proc().


At the end I ended up with two (actually three) questions:

a) Is it correct that the data passed to debug_proc() may have different 
CCSIDs depending on the type of data (protocoll versus post data)?

b) What do you think about to call debug_write() from CommTcp_BlockRead() 
and CommTcp_LineRead() instead of calling it from CommTcp_read()? In that 
case the protocol data could be first translated to the CCSID of the post 
data before adding it to the debug log. Furthermore CommTcp_LineRead() 
could pass a complete line to the debug log.

c) Am I completely off the track?


Regards,

Thomas.

--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and email confirmation to the sender.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------