iSockets Revision History

Changes made to the iSockets *SRVPGM

© Copyright 2006 by Robert Cozzi, Jr.

Feature Date Description
Fixed \r\n consistency 14-Dec-2009 Changed the way HTTP headers are sent to the remote socket. Previously a single X'25' was sent after each header, and then a final "empty line" was sent consisting of \r\n which is translated to X'0D25'. Some weak parsers have trouble with this, so now a \r\n is sent after each header followed by a final \r\n sequence.
AddHTTPHDR() 06=June-2009 Allows the user to insert HTTP headers that are sent to the remote socket upon a POST or GET operation.
SendURLText() fix 21-June-2007 This fix corrects a problem that can occur when not specifying the from and the to CCSIDs and no default values are specified. The SendURLText() subprocedure should be working correctly with this update applied.
Release 20-March-2007 Repurposed the formerly undocumented exports to a single, qualified data structure named ISOCKETS. Changed the name fo the iSockets_Log() subprocedure to iSocketsDBG() updated the signature due to several restructuring changing.
This release
requires a recompile but does not require code changes unless you were using an early version of iSockets v2.3 or later.
Logging 03-March-2007 Added debugLog() subprocedure which is the same as the joblog() subprocedure except it only writes to the joblog when the iSockets.Debug exported field is *ON and it only writes to an IFS text file (with additional information) when the iSocketsDbg() subprocedure is called with *ON as the first parameter.
escapeXML 03-March-2007 Exposed the escapeXML() subprocedure which properly escapes XML before you send it to standard output or to an XML document.
Timeout 15-June-2006 Added a SetURLTimeout() function as well as a TimeOut parameter to the GetURLData, PostURLData, and SndRcvURL functions.
Authentication Header 06-June-2006 Added a new SetURLUser() subprocedure. This subprocedure Sets the "Authentication" HTTP Header for websites that require a user ID and password access them.  Syntax is:  SetURLUser('COZZI' : 'ROSEBUD'). It is used only when PostURLData, GetURLData, SndRcvURL is used.

Where 'COZZI' is the user ID, and 'ROSEBUD' is the password. In this scenario, the following HTTP header is generated when the SndRcvURL, PostURLData, or GetURLData subprocedures are called.

Authorization  user  COZZI:ROSEBUD\r\n

GetURLData/PostURLData 01-June-2006 Fixed a limit in the parameters of these subprocedures. Increased the length of the form data that can be passed to 16k (from 4k). In addition, exposed the underlying SndRcvURL subprocedure, which is called by both GetURLData and PostURLData. This subprocedure accepts the address of the form data and the form data length as parameters, thus giving unlimited form length that may be passed. Warning, sizes beyond 64k have not been tested.
SetURLAuth 18-0ct-2006 Allows authentication header parameters to be specified directly.
GetURLAuth 18-0ct-2006 Returns the current authentication head in the form:

Authorization type userID:pwd\r\n

Where type is User or Basic or another choice, and the userID and pwd entries are previously specified on a call to SetURLAuth().

UTF-8 Support 24-Oct-2006 Prior to this release, iSockets converted everything to CCSID(367) before sending it to an HTTP server. It also converted from CCSID(367) back to the job CCSID. 

Now, iSockets converts between the Job CCSID and CCSID(1208) which is commonly referred to as UTF-8.

To override this behavior, call iSocketsCCSID(nFromCCSID : nToCCSID) where nFromCSSID is the job's CCSID or original CCSID, and nToCCSID is the target CCSID or 1208 by default.