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

Compiling httpapir4 we get two fatal errors on P_STATDS and ST_SIZE.



   Hello, Scott.Thank you for your attention.
   We download the HTTP API from [1]http://www.scottklement.com/httpapi/
   and try to install it by compiling the source code.
   The results show many CALLP erros. I found one thread about these
   problems call stack entry not found CPF2479 but the webpage reported
   in the answer that explain the BUG is missing.
   And there are also two erros because both names are not defined
   P_STATDS and ST_SIZE.
   Compiling results Attached:
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
    1
     Mandato  . . . . . . . . . . . . :   CRTRPGMOD
       Emitido por  . . . . . . . . . :     A_MAZA
     Módulo . . . . . . . . . . . . . :   HTTPAPIR4
       Biblioteca . . . . . . . . . . :     LIBHTTP
     Texto descriptivo  . . . . . . . :   *SRCMBRTXT
     Miembro Fuente . . . . . . . . . :   HTTPAPIR4
     Archivo Fuente . . . . . . . . . :   QRPGLESRC
       Biblioteca . . . . . . . . . . :     LIBHTTP
       CCSID  . . . . . . . . . . . . :     37
     Texto descriptivo  . . . . . . . :   HTTP-API service program
     Ultimo Cambio  . . . . . . . . . :   05/02/08  15:30:14
     Nivel de gravedad de generación  :   10
     Opciones de compilador . . . . . :   *XREF      *GEN       *NOSECLVL
    *SHOWCPY
                                          *EXPDDS    *EXT
   *NOSHOWSKP *NOSRCSTMT
                                          *DEBUGIO   *UNREF     *NOEVENTF
     Vistas de depuración . . . . . . :   *LIST
     Salida . . . . . . . . . . . . . :   *PRINT
     Nivel de optimización  . . . . . :   *NONE
     Sangrado del listado fuente  . . :   *NONE
     Opciones de conversión de tipo . :   *NONE
     Secuencia de ordenación  . . . . :   *HEX
     Identificador de idioma  . . . . :   *JOBRUN
     Sustituir módulo . . . . . . . . :   *YES
     Autorización . . . . . . . . . . :   *LIBCRTAUT
     Truncar numéricos  . . . . . . . :   *YES
     Arreglar numérico  . . . . . . . :   *NONE
     Release destino  . . . . . . . . :   *CURRENT
     Permitir valores nulos . . . . . :   *NO
     Directorio de enlace . . . . . . :   *NONE
     Definir nombres de condición . . :   *NONE
     Habilitar recogida de rendimiento:   *PEP
     Datos de perfilado . . . . . . . :   *NOCOL
     Opc Código interno bajo licencia :
     Generar interfaz de programa . . :   *NO
     Directorio Include . . . . . . . :
     Opciones del preprocesador . . . :   *NONE
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
    2
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
                             L i s t a d o   F u e n t e
        1 /*-
                  +                          000000     000100
        2  * Copyright (c) 2001-2008 Scott C. Klement
                  +                          080205     000200
        3  * All rights reserved.
                  +                          000000     000300
        4  *
                   +                          000000     000400
        5  * Redistribution and use in source and binary forms, with or
   without          +                          000000     000500
        6  * modification, are permitted provided that the following
   conditions          +                          000000     000600
        7  * are met:
                  +                          000000     000700
        8  * 1. Redistributions of source code must retain the above
   copyright           +                          000000     000800
        9  *    notice, this list of conditions and the following
   disclaimer.            +                          000000     000900
       10  * 2. Redistributions in binary form must reproduce the above
   copyright        +                          000000     001000
       11  *    notice, this list of conditions and the following
   disclaimer in the      +                          000000     001100
       12  *    documentation and/or other materials provided with the
   distribution.     +                          000000     001200
       13  *
                   +                          000000     001300
       14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS
   ''AS IS'' AND      +                          070828     001400
       15  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   LIMITED TO, THE       +                          000000     001500
       16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
   PARTICULAR PURPOSE  +                          000000     001600
       17  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR
   CONTRIBUTORS BE LIABLE     +                          000000
   001700
       18  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   CONSEQUENTIAL  +                          000000     001800
       19  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   SUBSTITUTE GOODS     +                          000000     001900
       20  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   INTERRUPTION)       +                          000000     002000
       21  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   CONTRACT, STRICT  +                          000000     002100
       22  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   ARISING IN ANY WAY   +                          000000     002200
       23  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   POSSIBILITY OF      +                          000000     002300
       24  * SUCH DAMAGE.
                  +                          000000     002400
       25  *
                   +                          000000     002500
       26  */
                  +                          000000     002600
       27
                                             000000     002700
       28 /*
                                              000000     002800
       29  * HTTPAPIR4 -- Hypertext transfer protocol API
                                             000000     002900
       30  *
                                              000000     003000
       31  *   A suite of routines for doing HTTP from ILE programs.
                                              000000     003100
       32  *
                                              000000     003200
       33  *   Requires:
                                              000000     003300
       34  *       ILE RPG/400 licensed program from IBM.  V4R2 or later.
                                             000000     003400
       35  *
                                              000000     003500
       36  *       Optional TLS/SSL capabilities require V4R5 or later.
                                             000000     003600
       37  *       and require the HTTP server, Client Encryption and
                                             000000     003700
       38  *       Digital Certificate Manger Licensed programs.
                                              000000     003800
       39  *
                                              000000     003900
       40  *       See the README member, included in this package for
   details.                                     000000     004000
       41  *
                                              000000     004100
       42  *   To Compile:
                                              000000     004200
       43  *      - Edit the CONFIG_H member to set options.
                                              000000     004300
       44  *      CRTCLPGM INSTALL SRCFILE(libhttp/QCLSRC)
                                              000000     004400
       45  *      CALL INSTALL
                                              000000     004500
       46  *
                                              000000     004600
       47  *  To Update this module (HTTPAPIR4) without running
                                             000000     004700
       48  *     the whole install procedure:
                                             000000     004800
       49  *
                                              000000     004900
       50  *      CRTRPGMOD HTTPAPIR4 SRCFILE(LIBHTTP/QRPGLESRC)
   DBGVIEW(*LIST)                                     000000     005000
       51  *      UPDSRVPGM SRVPGM(LIBHTTP/HTTPAPIR4) MODULE(HTTPAPIR4) +
                                             000000     005100
       52  *                EXPORT(*CURRENT)
                                              000000     005200
       53  */
                                             000000     005300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
    3
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
       54
                                             000000     005400
       55 H COPYRIGHT('Copyright (c) 2001-2008 Scott C. Klement.  All
   rights +                                      080205     005500
       56 H reserved.  A member called "LICENSE" was included with this +
                                             000000     005600
       57 H distribution, and contains important license information.')
                                             000000     005700
       58
                                             000000     005800
       59  /if defined(HAVE_SRCSTMT_NODEBUGIO)
                                              000000     005900
               LINES EXCLUDED: 1
       60  /endif
                                             000000     006100
       61 H NOMAIN
                                              000000     006200
       62
                                             000000     006300
       63  /copy QRPGLESRC,HTTPAPI_H
                                              000000     006400

   *---------------------------------------------------------------------
   -----------------------*
           * Nombre de miembro RPG  . . :  HTTPAPI_H
                                  *                     1
           * Nombre externo . . . . . . :  LIBHTTP/QRPGLESRC(HTTPAPI_H)
                                 *                     1
           * Ultimo cambio  . . . . . . :  24/02/10  09:53:38
                                 *                     1
           * Texto descriptivo  . . . . :  HTTP-API header member
                                 *                     1

   *---------------------------------------------------------------------
   -----------------------*
       64+/*-
                  +                          000000    1000100
       65+ * Copyright (c) 2001-2008 Scott C. Klement
                  +                          080205    1000200
       66+ * All rights reserved.
                  +                          000000    1000300
       67+ *
                   +                          000000    1000400
       68+ * Redistribution and use in source and binary forms, with or
   without          +                          000000    1000500
       69+ * modification, are permitted provided that the following
   conditions          +                          000000    1000600
       70+ * are met:
                  +                          000000    1000700
       71+ * 1. Redistributions of source code must retain the above
   copyright           +                          000000    1000800
       72+ *    notice, this list of conditions and the following
   disclaimer.            +                          000000    1000900
       73+ * 2. Redistributions in binary form must reproduce the above
   copyright        +                          000000    1001000
       74+ *    notice, this list of conditions and the following
   disclaimer in the      +                          000000    1001100
       75+ *    documentation and/or other materials provided with the
   distribution.     +                          000000    1001200
       76+ *
                   +                          000000    1001300
       77+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS
   ''AS IS'' AND      +                          070828    1001400
       78+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   LIMITED TO, THE       +                          000000    1001500
       79+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
   PARTICULAR PURPOSE  +                          000000    1001600
       80+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR
   CONTRIBUTORS BE LIABLE     +                          000000
   1001700
       81+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   CONSEQUENTIAL  +                          000000    1001800
       82+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   SUBSTITUTE GOODS     +                          000000    1001900
       83+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   INTERRUPTION)       +                          000000    1002000
       84+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   CONTRACT, STRICT  +                          000000    1002100
       85+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   ARISING IN ANY WAY   +                          000000    1002200
       86+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   POSSIBILITY OF      +                          000000    1002300
       87+ * SUCH DAMAGE.
                  +                          000000    1002400
       88+ *
                   +                          000000    1002500
       89+ */
                  +                          000000    1002600
       90+
                                              000000    1002700
       91+ /if defined(HTTPAPI_H)
                                             000000    1002800
               LINES EXCLUDED: 1
       92+ /endif
                                             000000    1003000
       93+
                                              000000    1003100
       94+D HTTPAPI_VERSION...
                                              000000    1003200
       95+D                 C                   CONST('1.23')
                                             080424    1003300
       96+D HTTPAPI_RELDATE...
                                              000000    1003400
       97+D                 C                   CONST('2008-04-24')
                                             080424    1003500
       98+
                                              070628    1003600
       99+ /copy *LIBL/qrpglesrc,config_h
                                             070509    1003700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
    4
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número

   *---------------------------------------------------------------------
   -----------------------*
           * Nombre de miembro RPG  . . :  CONFIG_H
                                 *                     2
           * Nombre externo . . . . . . :  LIBHTTP/QRPGLESRC(CONFIG_H)
                                  *                     2
           * Ultimo cambio  . . . . . . :  24/02/10  09:53:38
                                 *                     2
           * Texto descriptivo  . . . . :  HTTP-API compile-time
   configuration                          *                     2

   *---------------------------------------------------------------------
   -----------------------*
      100+***  If you do not want SSL support, comment out the line
   below.                                          011020    2000100
      101+***   (You _must_ do this if you're running V4R4 or earlier)
                                              011020    2000200
      102+
                                              011020    2000300
      103+D/define HAVE_SSLAPI
                                              021030    2000400
      104+
                                              040303    2000500
      105+***  define this if your RPG compiler supports 64-bit integers
                                              040303    2000600
      106+***  (they were introduced in V4R4)
                                             040303    2000700
      107+***
                                             040303    2000800
      108+
                                              040303    2000900
      109+D/define HAVE_INT64
                                             040303    2001000
      110+
                                              040303    2001100
      111+***  define this if your RPG compiler supports
                                              040303    2001200
      112+***  options(*SRCSTMT: *NODEBUGIO: *NOSHOWCPY)
                                              040303    2001300
      113+***  (they were introduced in V4R4, but can be enabled as far
                                             040303    2001400
      114+***   back as V3R2 using PTFs)
                                              040303    2001500
      115+
                                              040303    2001600
      116+D/define HAVE_SRCSTMT_NODEBUGIO
                                             040303    2001700
      117+
                                              050622    2001800
      118+***  In V4R5 it's possible to enable GSKit for SSL via
                                              050622    2001900
      119+***    PTFs. However, some functionality wasn't yet available
                                             050622    2002000
      120+***    in that release. Define this if you need SSL to be
   limited                                         050622    2002100
      121+***    to what's available on a V4R5 system. (This is ignored
                                             050622    2002200
      122+***    when SSL is disabled.)
                                             050622    2002300
      123+
                                              050622    2002400
      124+D/undefine V4R5_GSKIT
                                             050622    2002500
      125+
                                              011020    2002600
      126+***  This is the default timeout value (in seconds) that
   HTTPAPI                                          011020    2002700
      127+***  uses if a timeout value isn't specified by the calling
                                             011020    2002800
      128+***  program:
                                             011020    2002900
      129+
                                              011020    2003000
      130+D HTTP_TIMEOUT    C                   CONST(60)
                                             060327    2003100
      131+
                                              011020    2003200
      132+***  This is the 'User-Agent' name that is reported by this API
                                             011020    2003300
      133+***  to the web servers if you don't specify it explcitly when
                                              011020    2003400
      134+***  calling the routines.
                                              011020    2003500
      135+
                                              011020    2003600
      136+D HTTP_USERAGENT  C                   CONST('http-api/1.23')
                                              080424    2003700
      137+
                                              011020    2003800
      138+***  This is the 'Content-Type' that is reported by this API
                                              011020    2003900
      139+***  to the web servers if you don't specify it explcitly when
                                              011020    2004000
      140+***  calling the POST routines.   (the GET routines, by
   default,                                          011020    2004100
      141+***  do not specify a content-type.)
                                              011020    2004200
      142+
                                              011020    2004300
      143+D HTTP_CONTTYPE   C                   CONST('text/xml')
                                             031001    2004400
      144+
                                              011020    2004500
      145+***  The original implementation of HTTPAPI used tables
                                             050623    2004600
      146+***  (*TBL objects) to translate from ASCII to EBCDIC. These
   can                                          050623    2004700
      147+***  be enabled/set by defining the HTTP_USE_TABLES condition,
                                              050623    2004800
      148+***  and then setting the table names.  They can be overridden
                                              050623    2004900
      149+***  at runtime by calling HTTP_setTables().
                                              050623    2005000
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
    5
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
      150+***
                                             050623    2005100
      151+***  In the current implementation, we prefer that you use
   CCSIDs                                         050623    2005200
      152+***  instead of tables. When HTTP_USE_TABLES is not defined,
                                              050623    2005300
      153+***  the HTTP_EBCDIC and HTTP_ASCII constants represent the
                                             050623    2005400
      154+***  default CCSIDs for ASCII<-->EBCDIC translation.  They can
   be                                         050623    2005500
      155+***  overridden at runtime by calling HTTP_setCCSIDs()
                                              050623    2005600
      156+***
                                             050623    2005700
      157+
                                              011020    2005800
      158+ /undefine HTTP_USE_TABLES
                                              060923    2005900
      159+ /if defined(HTTP_USE_TABLES)
                                             050623    2006000
               LINES EXCLUDED: 2
      160+ /else
                                              050623    2006300
      161+D HTTP_EBCDIC     C                   CONST(0)
                                              050623    2006400
      162+D HTTP_ASCII      C                   CONST(819)
                                              060330    2006500
      163+ /endif
                                             050623    2006600
      164+
                                              011020    2006700
      165+***  This is the codepage or CCSID assigned to downloaded
   stream                                          050623    2006800
      166+***  files by default. (Note: HTTPAPI does not convert the file
                                             050623    2006900
      167+***  to this CCSID, it just assigns this number to the file's
                                             050623    2007000
      168+***  attributes.)
                                             050623    2007100
      169+***
                                             050623    2007200
      170+***  Whether this is treated as a CCSID or a codepage depends
   on                                          050623    2007300
      171+***  the value of the HTTP USE CCSID condition, below.
                                              050623    2007400
      172+***
                                             050623    2007500
      173+***  Can be overridden at runtime by calling
   HTTP_SetFileCCSID()                                          050623
    2007600
      174+
                                              011020    2007700
      175+D HTTP_CCSID      C                   CONST(819)
                                              061116    2007800
      176+
                                              050623    2007900
      177+***  Starting in V5R1, a full CCSID is available in the IFS
                                             050623    2008000
      178+***  instead of a codepage. When this is defined, CCSID support
                                             050623    2008100
      179+***  will be used instead of codepages
                                              050623    2008200
      180+
                                              050623    2008300
      181+D/define HTTP_USE_CCSID
                                             050623    2008400
      182+
                                              011020    2008500
      183+***  This is the file mode used when creating files in the IFS.
                                             011020    2008600
      184+***  (Caution: This mode is given in DECIMAL, not octal!)
                                             011020    2008700
      185+***  Octal 666 = Decimal 438  (RW-RW-RW-)
                                             011020    2008800
      186+***  Octal 644 = Decimal 420  (RW-R--R--)
                                             011020    2008900
      187+***  Octal 777 = Decimal 511  (RWXRWXRWX)
                                             011020    2009000
      188+***  Octal 755 = Decimal 493  (RWXR-XR-X)
                                             011020    2009100
      189+
                                              011020    2009200
      190+D HTTP_IFSMODE    C                   CONST(511)
                                              011020    2009300
      191+
                                              030327    2009400
      192+***  HTTPAPI normally uses non-blocking sockets to ensure that
                                              050630    2009500
      193+***  the session never "hangs".  However, during the connection
                                             050630    2009600
      194+***  progress, this can mean that information gets lost.
                                              050630    2009700
      195+***
                                             050630    2009800
      196+***  Define this to wait until after the connection is
   established                                        050630    2009900
      197+***  before switching the socket to non-blocking.
                                             050630    2010000
      198+D/define HTTP_BLOCK_ON_CONNECT
                                              050630    2010100
      199+
                                              060221    2010200
      200+***
                                             060221    2010300
      201+*** This determines whether Cookies are turned *ON or *OFF
                                              060221    2010400
      202+*** by default.
                                             060507    2010500
      203+***
                                             060221    2010600
      204+DHTTP_COOKIE_DEFAULT...
                                             060221    2010700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
    6
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
      205+D                 C                   CONST(*ON)
                                              060507    2010800
      206+
                                              050630    2010900
      207+***  This changes whether debugging is on or off by default.
                                              041103    2011000
      208+***  You can override this at runtime by calling the
   http_debug()                                         041103    2011100
      209+***  procedure.
                                             041103    2011200
      210+D/undefine DEBUG
                                              060323    2011300
      211+DHTTP_DEBUG_FILE  s            500A   varying
                                             041103    2011400
      212+D
   inz('/tmp/httpapi_debug.txt')
   041103    2011500
      213+
                                              070125    2011600
      214+***  This changes how memory is allocated.  If defined, HTTPAPI
                                             070125    2011700
      215+***  will allocate memory in TERASPACE, thus allowing for very
                                              070125    2011800
      216+***  large allocations.
                                             070828    2011900
      217+D/undefine USE_TS_MALLOC64
                                              070828    2012000
      218+D/undefine USE_TS_MALLOC64
                                              070828    2012100
      219+***  With both turned off (default) up to 16 MB per allocation.
                                             070828    2012200
      220+***  WARNING: This is currently experimental!!  If you have
                                             070828    2012300
      221+***           problems, make sure TERASPACE is undefined.
                                             070828    2012400
      222+D/undefine TERASPACE
                                              070426    2012500
      223+D/undefine USE_TS_MALLOC64
                                              070828    2012600
      224+
                                              071218    2012700
      225+***  This allows access to V5R3 (or higher) functions in the
                                              071218    2012800
      226+***  SSL environment.  Only define this if HTTPAPI will be used
                                             071218    2012900
      227+***  on V5R3 or later.
                                              071218    2013000
      228+D/define V5R3_GSKIT
                                             071218    2013100
      229+
                                              000000    1003800
      230+
   *********************************************************************
                                      000000    1003900
      231+ **  procedure prototypes
                                             000000    1004000
      232+
   *********************************************************************
                                      000000    1004100
      233+
                                              000000    1004200
      234+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1004300
      235+ *  http_get(): Retrieve an HTTP document
                                             000000    1004400
      236+ *  http_url_get(): Retrieve an HTTP document
                                             000000    1004500
      237+ *
                                              000000    1004600
      238+ *       peURL = url to grab  (i.e.
   [2]http://www.blah.com/dir/file.txt)
     000000    1004700
      239+ *  peFilename = filename in IFS to save response into
                                              000000    1004800
      240+ *  peTimeout  = (optional) give up if no data is received for
                                              000000    1004900
      241+ *          this many seconds.
                                              000000    1005000
      242+ *  peModTime  = (optional) only get file if it was changed
   since                                         000000    1005100
      243+ *          this timestamp.
                                             000000    1005200
      244+ *  peContentType = (optional) content type to supply (mainly
                                             000000    1005300
      245+ *          useful when talking to CGI scripts.) To supply the
                                              000000    1005400
      246+ *          default value for this parm, you can supply the
                                             000000    1005500
      247+ *          HTTP_CONTTYPE constant.
                                             000000    1005600
      248+ *  peUserAgent = (optional) This specifies the name & version
                                              000000    1005700
      249+ *          of your HTTP client to the server.  The server uses
                                             000000    1005800
      250+ *          it for statistics and sometimes to restrict pages
                                             000000    1005900
      251+ *          so that they're "only for Internet Explorer."
                                             000000    1006000
      252+ *  peSOAPAction = (optional) string used to specify the action
                                             000000    1006100
      253+ *          taken by some SOAP applications.
                                              000000    1006200
      254+ *
                                              000000    1006300
      255+ *  Returns  -1 = internal error (check HTTP_ERROR)
                                             000000    1006400
      256+ *            0 = timeout while receiving data or connecting
                                              000000    1006500
      257+ *            1 = file retrieved successfully
                                             000000    1006600
      258+ *          > 1 = HTTP response code indicating server's error
   reply                                      000000    1006700
      259+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1006800
      260+D http_get        PR            10I 0 extproc('HTTP_URL_GET')
                                             000000    1006900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
    7
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
      261+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1007000
      262+D  peFilename                32767A   varying const
   options(*varsize)                                     000000
   1007100
      263+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1007200
      264+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1007300
      265+D  peModTime                      Z   const
   options(*nopass:*omit)                                        000000
    1007400
      266+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1007500
      267+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1007600
      268+D http_url_get    PR            10I 0
                                             000000    1007700
      269+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1007800
      270+D  peFilename                32767A   varying const
   options(*varsize)                                     000000
   1007900
      271+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1008000
      272+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1008100
      273+D  peModTime                      Z   const
   options(*nopass:*omit)                                        000000
    1008200
      274+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1008300
      275+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1008400
      276+
                                              000000    1008500
      277+
                                              000000    1008600
      278+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1008700
      279+ *  http_url_post(): Post data to CGI script and get document
                                             000000    1008800
      280+ *
                                              000000    1008900
      281+ *         peURL = url to post to
   ([3]http://www.blah.com/cgi-bin/etc)
       000000    1009000
      282+ *    pePostData = pointer to data to post to CGI script.
                                             000000    1009100
      283+ * pePostDataLen = length of data to post to CGI script.
                                              000000    1009200
      284+ *   peFileName  = Filename in IFS to save response into
                                              000000    1009300
      285+ *    peTimeout  = (optional) give up if no data is received
   for                                          000000    1009400
      286+ *            this many seconds.
                                              000000    1009500
      287+ * peUserAgent = (optional) User-Agent string passed to the
                                             000000    1009600
      288+ *            server.  Pass the named constant HTTP_USERAGENT
                                             000000    1009700
      289+ *            if you want to get the default value.
                                             000000    1009800
      290+ * peContentType = (optional) content type to supply (mainly
                                              000000    1009900
      291+ *            useful when talking to CGI scripts)
                                             000000    1010000
      292+ *  peSOAPAction = (optional) string used to specify the action
                                             000000    1010100
      293+ *          taken by some SOAP applications.
                                              000000    1010200
      294+ *
                                              000000    1010300
      295+ *  Returns  -1 = internal error (check HTTP_ERROR)
                                             000000    1010400
      296+ *            0 = timeout while receiving data or connecting
                                              000000    1010500
      297+ *            1 = file retrieved successfully
                                             000000    1010600
      298+ *          > 1 = HTTP response code indicating server's error
   reply                                      000000    1010700
      299+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1010800
      300+D http_post       PR            10I 0 EXTPROC('HTTP_URL_POST')
                                              000000    1010900
      301+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1011000
      302+D  pePostData                     *   value
                                             000000    1011100
      303+D  pePostDataLen                10I 0 value
                                             000000    1011200
      304+D  peFilename                32767A   varying const
   options(*varsize)                                     000000
   1011300
      305+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1011400
      306+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1011500
      307+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1011600
      308+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1011700
      309+D http_url_post   PR            10I 0
                                             000000    1011800
      310+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1011900
      311+D  pePostData                     *   value
                                             000000    1012000
      312+D  pePostDataLen                10I 0 value
                                             000000    1012100
      313+D  peFilename                32767A   varying const
   options(*varsize)                                     000000
   1012200
      314+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1012300
      315+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1012400
      316+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1012500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
    8
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
      317+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1012600
      318+
                                              000000    1012700
      319+
                                              000000    1012800
      320+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1012900
      321+ *  http_url_get_raw(): Retrieve an HTTP document (in raw mode)
                                             000000    1013000
      322+ *
                                              000000    1013100
      323+ *       peURL = url to grab  (i.e.
   [4]http://www.blah.com/dir/file.txt)
     000000    1013200
      324+ *       peFD  = FD to pass back to peProc
                                              000000    1013300
      325+ *     peProc  = procedure to call each time data is received.
                                              000000    1013400
      326+ *  peTimeout  = (optional) give up if no data is received for
                                              000000    1013500
      327+ *          this many seconds.
                                              000000    1013600
      328+ * peUserAgent = (optional) User-Agent string passed to the
                                             000000    1013700
      329+ *            server.  Pass the named constant HTTP_USERAGENT
                                             000000    1013800
      330+ *            if you want to get the default value.
                                             000000    1013900
      331+ *  peModTime  = (optiona) only get file if it was changed
   since                                          000000    1014000
      332+ *          this timestamp.
                                             000000    1014100
      333+ *  peContentType = (optional) content type to supply (mainly
                                             000000    1014200
      334+ *          useful when talking to CGI scripts)
                                             000000    1014300
      335+ *  peSOAPAction = (optional) string used to specify the action
                                             000000    1014400
      336+ *          taken by some SOAP applications.
                                              000000    1014500
      337+ *
                                              000000    1014600
      338+ *  Returns  (same as http_url_get)
                                             000000    1014700
      339+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1014800
      340+D http_url_get_raw...
                                             000000    1014900
      341+D                 PR            10I 0
                                             000000    1015000
      342+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1015100
      343+D  peFD                         10I 0 value
                                             000000    1015200
      344+D  peProc                         *   value procptr
                                             000000    1015300
      345+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1015400
      346+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1015500
      347+D  peModTime                      Z   const
   options(*nopass:*omit)                                        000000
    1015600
      348+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1015700
      349+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1015800
      350+
                                              000000    1015900
      351+
                                              000000    1016000
      352+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1016100
      353+ *  http_url_post_raw(): Post data to CGI script and get
   document                                         000000    1016200
      354+ *
                                              000000    1016300
      355+ *         peURL = url to post to
   ([5]http://www.blah.com/cgi-bin/etc)
       000000    1016400
      356+ *    pePostData = pointer to data to post to CGI script.
                                             000000    1016500
      357+ * pePostDataLen = length of data to post to CGI script.
                                              000000    1016600
      358+ *         peFD  = FD to pass back to peProc
                                              000000    1016700
      359+ *       peProc  = procedure to call each time data is
   received.                                          000000    1016800
      360+ *    peTimeout  = (optional) give up if no data is received
   for                                          000000    1016900
      361+ *            this many seconds.
                                              000000    1017000
      362+ *  peUserAgent  = (optional) User-Agent string passed to the
                                             000000    1017100
      363+ *            server.  Pass the named constant HTTP_USERAGENT
                                             000000    1017200
      364+ *            if you want to get the default value.
                                             000000    1017300
      365+ * peContentType = (optional) content type to supply (mainly
                                              000000    1017400
      366+ *            useful when talking to CGI scripts)
                                             000000    1017500
      367+ *  peSOAPAction = (optional) string used to specify the action
                                             000000    1017600
      368+ *          taken by some SOAP applications.
                                              000000    1017700
      369+ *
                                              000000    1017800
      370+ *  Returns  (same as http_url_post)
                                              000000    1017900
      371+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1018000
      372+D http_url_post_raw...
                                              000000    1018100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
    9
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
      373+D                 PR            10I 0
                                             000000    1018200
      374+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1018300
      375+D  pePostData                     *   value
                                             000000    1018400
      376+D  pePostDataLen                10I 0 value
                                             000000    1018500
      377+D  peFD                         10I 0 value
                                             000000    1018600
      378+D  peProc                         *   value procptr
                                             000000    1018700
      379+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1018800
      380+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1018900
      381+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1019000
      382+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1019100
      383+
                                              000000    1019200
      384+
                                              000000    1019300
      385+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1019400
      386+ *  http_ParseURL(): Parse URL into it's component parts
                                              000000    1019500
      387+ *
                                              000000    1019600
      388+ *  Breaks a uniform resource locator (URL) into it's component
                                             000000    1019700
      389+ *  pieces for use with the http: or https: protocols.  (would
   also                                       000000    1019800
      390+ *  work for FTP with minor tweaks)
                                             000000    1019900
      391+ *
                                              000000    1020000
      392+ *  peURL = URL that needs to be parsed.
                                              000000    1020100
      393+ *  peService = service name from URL (i.e. http or https)
                                              000000    1020200
      394+ *  peUserName = user name given, or *blanks
                                              000000    1020300
      395+ *  pePassword = password given, or *blanks
                                             000000    1020400
      396+ *  peHost = hostname given in URL. (could be domain name or
   IP)                                          000000    1020500
      397+ *  pePort = port number to connect to, if specified, otherwise
   0.                                        000000    1020600
      398+ *  pePath = remaining path/request for server.
                                             000000    1020700
      399+ *
                                              000000    1020800
      400+ *  returns -1 upon failure, or 0 upon success
                                              000000    1020900
      401+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1021000
      402+D http_ParseURL   PR            10I 0
                                             000000    1021100
      403+D  peURL                       256A   const
                                             000000    1021200
      404+D  peService                    32A
                                             000000    1021300
      405+D  peUserName                   32A
                                             000000    1021400
      406+D  pePassword                   32A
                                             000000    1021500
      407+D  peHost                      256A
                                             000000    1021600
      408+D  pePort                       10I 0
                                             000000    1021700
      409+D  pePath                      256A
                                             000000    1021800
      410+
                                              000000    1021900
      411+
                                              000000    1022000
      412+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1022100
      413+ *  http_build_sockaddr():  Build a socket address structure
   for a host                                   000000    1022200
      414+ *
                                              000000    1022300
      415+ *        peHost = hostname to build sockaddr_in for
                                              000000    1022400
      416+ *     peService = service name (or port) to build sockaddr_in
   for                                        000000    1022500
      417+ *   peForcePort = numeric port to force entry to, overrides
   peService                                    000000    1022600
      418+ *    peSockAddr = pointer to a location to place a sockaddr_in
   into.                                     000000    1022700
      419+ *             (if *NULL, memory will be allocated, otherwise
   it will                                     000000    1022800
      420+ *                be re-alloc'ed)
                                             000000    1022900
      421+ *
                                              000000    1023000
      422+ *   returns -1 upon failure, 0 upon success
                                              000000    1023100
      423+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1023200
      424+D http_build_sockaddr...
                                              000000    1023300
      425+D                 PR            10I 0
                                             000000    1023400
      426+D   peHost                     256A   const
                                             000000    1023500
      427+D   peService                   32A   const
                                             000000    1023600
      428+D   peForcePort                 10I 0 value
                                             000000    1023700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   10
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
      429+D   peSockAddr                    *
                                             000000    1023800
      430+
                                              000000    1023900
      431+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1024000
      432+ *  http_close(): close HTTP connection
                                             000000    1024100
      433+ *
                                              000000    1024200
      434+ *         peSock = socket to close
                                             000000    1024300
      435+ *         peComm = comm driver opened with
   http_select_commdriver()                                      000000
    1024400
      436+ *
                                              000000    1024500
      437+ *  returns -1 upon failure, or 0 upon success
                                              000000    1024600
      438+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1024700
      439+D http_close      PR            10I 0
                                             000000    1024800
      440+D  peSock                       10I 0 value
                                             000000    1024900
      441+D  peComm                         *   value
                                             000000    1025000
      442+
                                              000000    1025100
      443+
                                              000000    1025200
      444+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1025300
      445+ *  http_error():   Return the last error that occurred.
                                              000000    1025400
      446+ *
                                              000000    1025500
      447+ *     peErrorNo = (optional) error number that occurred.
                                             000000    1025600
      448+ *
                                              000000    1025700
      449+ *  Returns the human-readable error message.
                                             000000    1025800
      450+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1025900
      451+D http_error      PR            80A
                                             000000    1026000
      452+D   peErrorNo                   10I 0 options(*nopass:*omit)
                                              000000    1026100
      453+
                                              000000    1026200
      454+ /if defined(HAVE_SSLAPI)
                                             000000    1026300
      455+
                                              000000    1026400
      456+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1026500
      457+ * https_init():  Initialize https (HTTP over SSL/TLS) protocol
                                             000000    1026600
      458+ *
                                              000000    1026700
      459+ *     peAppID = application ID that you registered program as
                                              000000    1026800
      460+ *        in the Digital Certificate Manager
                                              000000    1026900
      461+ *         NOTE: You can pass *BLANKS for this parameter if you
                                             000000    1027000
      462+ *               you do not wish to register your application
                                             000000    1027100
      463+ *               with the digital certificate manager.
                                              000000    1027200
      464+ *     peSSLv2 = (optional) Turn SSL version 2 *ON or *OFF
                                              000000    1027300
      465+ *     peSSLv3 = (optional) Turn SSL version 3 *ON or *OFF
                                              000000    1027400
      466+ *     peTLSv1 = (optional) Turn TLS version 1 *ON or *OFF
                                              000000    1027500
      467+ *
                                              000000    1027600
      468+ *   You must pass all of the SSL/TLS flags or none.  If you
                                              000000    1027700
      469+ *   do not pass all three flags, they are ignored.
                                             000000    1027800
      470+ *
                                              000000    1027900
      471+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1028000
      472+D https_init      PR            10I 0
                                             000000    1028100
      473+D  peAppID                     100A   const
                                             000000    1028200
      474+D  peSSLv2                       1N   const options(*nopass)
                                              000000    1028300
      475+D  peSSLv3                       1N   const options(*nopass)
                                              000000    1028400
      476+D  peTLSv1                       1N   const options(*nopass)
                                              000000    1028500
      477+
                                              000000    1028600
      478+
                                              000000    1028700
      479+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1028800
      480+ *  Register your application with the Digital Certificate
   Manager                                        000000    1028900
      481+ *
                                              000000    1029000
      482+ *    peAppID = application ID.  IBM recommends that you do
                                             000000    1029100
      483+ *         something like:  COMPANY_COMPONENT_NAME
                                              000000    1029200
      484+ *         (example:  QIBM_DIRSRV_REPLICATION)
                                              000000    1029300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   11
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
      485+ *
                                              000000    1029400
      486+ *  peLimitCA = set to *On if you want to only want to allow
   the                                          000000    1029500
      487+ *         certificate authorities registered in D.C.M., or set
   to                                        000000    1029600
      488+ *         *Off if you'll manage that yourself.
                                             000000    1029700
      489+ *
                                              000000    1029800
      490+ *   returns 0 for success, or -1 upon failure
                                              000000    1029900
      491+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1030000
      492+D https_dcm_reg   PR            10I 0
                                             000000    1030100
      493+D  peAppID                     100A   const
                                             000000    1030200
      494+D  peLimitCA                     1N   const
                                             000000    1030300
      495+
                                              000000    1030400
      496+
                                              000000    1030500
      497+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1030600
      498+ * https_cleanup():  Clean up & free storage used by the SSL
                                              000000    1030700
      499+ *   environment.
                                             000000    1030800
      500+ *
                                              000000    1030900
      501+ *  returns 0 if successful, -1 upon failure
                                              000000    1031000
      502+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1031100
      503+D https_cleanup   PR            10I 0
                                             000000    1031200
      504+
                                              071218    1031300
      505+
                                              071218    1031400
      506+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     071218    1031500
      507+ * https_idname(): Returns a string that describes an SSL
   certificate                                     071218    1031600
      508+ *                  data element id (for printing/debugging)
                                              071218    1031700
      509+ *
                                              071218    1031800
      510+ *       peID = (input) data ID to get name of
                                              071218    1031900
      511+ *
                                              071218    1032000
      512+ * Returns the human-readable name
                                              071218    1032100
      513+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     071218    1032200
      514+D https_idname    PR            50A   varying
                                             071218    1032300
      515+D   peID                        10I 0 value
                                             071218    1032400
      516+
                                              071218    1032500
      517+
                                              071218    1032600
      518+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     071218    1032700
      519+ * https_strict(): Force SSL to be strictly validated
                                             071218    1032800
      520+ *
                                              071218    1032900
      521+ *      peSetting = (input) *ON  = use full validation
                                              071218    1033000
      522+ *                          *OFF = use passthru validation
                                              071218    1033100
      523+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     071218    1033200
      524+D https_strict    PR
                                              071218    1033300
      525+D   peSetting                    1n   const
                                             071218    1033400
      526+
                                              000000    1033500
      527+ /endif
                                             000000    1033600
      528+
                                              000000    1033700
      529+
                                              000000    1033800
      530+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1033900
      531+ *  http_getauth():   Get HTTP Authentication Information
                                             000000    1034000
      532+ *
                                              000000    1034100
      533+ *   Call this proc after you receive a HTTP_NDAUTH error
                                             000000    1034200
      534+ *   to determine the authentication credentials that are
   required                                        000000    1034300
      535+ *
                                              000000    1034400
      536+ *  The following parms are returned to your program:
                                             000000    1034500
      537+ *
                                              000000    1034600
      538+ *     peBasic = *ON if BASIC auth is allowed
                                             000000    1034700
      539+ *    peDigest = *ON if MD5 DIGEST auth is allowed
                                              000000    1034800
      540+ *     peRealm = Auth realm.  Present this to the user to
   identify                                        000000    1034900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   12
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
      541+ *               which password you're looking for.  For
   example                                          000000    1035000
      542+ *               if peRealm is "secureserver.com" you might say
                                             000000    1035100
      543+ *               "enter password for secureserver.com" to user.
                                             000000    1035200
      544+ *
                                              000000    1035300
      545+ *   After getting the userid & password from the user (or
   database)                                      000000    1035400
      546+ *   you'll need to call http_setauth()
                                             000000    1035500
      547+ *
                                              000000    1035600
      548+ *  Returns -1 upon error, or 0 if successful
                                             000000    1035700
      549+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1035800
      550+D http_getauth    PR            10I 0
                                             000000    1035900
      551+D   peBasic                      1N
                                             000000    1036000
      552+D   peDigest                     1N
                                             000000    1036100
      553+D   peRealm                    124A
                                             000000    1036200
      554+
                                              000000    1036300
      555+
                                              000000    1036400
      556+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1036500
      557+ *  http_setauth():   Set HTTP Authentication Information
                                             000000    1036600
      558+ *
                                              000000    1036700
      559+ *     peAuthType = Authentication Type (HTTP_AUTH_BASIC or
                                             000000    1036800
      560+ *                     HTTP_AUTH_MD5_DIGEST)
                                              000000    1036900
      561+ *     peUsername = UserName to use
                                             000000    1037000
      562+ *     pePasswd   = Password to use
                                             000000    1037100
      563+ *
                                              000000    1037200
      564+ *  Returns -1 upon error, or 0 if successful
                                             000000    1037300
      565+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1037400
      566+D http_setauth    PR            10I 0
                                             000000    1037500
      567+D   peAuthType                   1A   const
                                             000000    1037600
      568+D   peUsername                  80A   const
                                             000000    1037700
      569+D   pePasswd                  1024A   const
                                             000000    1037800
      570+
                                              000000    1037900
      571+
                                              000000    1038000
      572+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1038100
      573+ *  http_setproxy():   Set HTTP Proxy Address
                                             000000    1038200
      574+ *
                                              000000    1038300
      575+ *     peHost = Proxy host name
                                             000000    1038400
      576+ *     psPort = Proxy port
                                              000000    1038500
      577+ *
                                              000000    1038600
      578+ *  Returns -1 upon error, or 0 if successful
                                             000000    1038700
      579+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1038800
      580+D http_setproxy   PR            10I 0
                                             000000    1038900
      581+D   peHost                     256A   const
                                             000000    1039000
      582+D   pePort                      10I 0 const
                                             000000    1039100
      583+
                                              000000    1039200
      584+
                                              000000    1039300
      585+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1039400
      586+ *  http_proxy_setauth():   Set HTTP Proxy Authentication
   Information                                     000000    1039500
      587+ *
                                              000000    1039600
      588+ *     peAuthType = Authentication Type (HTTP_AUTH_NONE or
                                              000000    1039700
      589+ *                     HTTP_AUTH_BASIC)
                                             000000    1039800
      590+ *     peUsername = UserName to use
                                             000000    1039900
      591+ *     pePasswd   = Password to use
                                             000000    1040000
      592+ *
                                              000000    1040100
      593+ *  Returns -1 upon error, or 0 if successful
                                             000000    1040200
      594+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1040300
      595+D http_proxy_setauth...
                                             000000    1040400
      596+D                 PR            10I 0
                                             000000    1040500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   13
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
      597+D   peAuthType                   1A   const
                                             000000    1040600
      598+D   peUsername                  80A   const
                                             000000    1040700
      599+D   pePasswd                  1024A   const
                                             000000    1040800
      600+
                                              000000    1040900
      601+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1041000
      602+ *  http_proxy_getauth():   Get HTTP Proxy Authentication
   Information                                     000000    1041100
      603+ *
                                              000000    1041200
      604+ *   Call this proc after you receive a HTTP_PXNDAUTH error
                                             000000    1041300
      605+ *   to determine the authentication credentials that are
   required                                        000000    1041400
      606+ *
                                              000000    1041500
      607+ *  The following parms are returned to your program:
                                             000000    1041600
      608+ *
                                              000000    1041700
      609+ *     peBasic = *ON if BASIC auth is allowed
                                             000000    1041800
      610+ *     peRealm = Auth realm.  Present this to the user to
   identify                                        000000    1041900
      611+ *               which password you're looking for.  For
   example                                          000000    1042000
      612+ *               if peRealm is "secureproxy.com" you might say
                                              000000    1042100
      613+ *               "enter password for secureproxy.com" to user.
                                              000000    1042200
      614+ *
                                              000000    1042300
      615+ *   After getting the userid & password from the user (or
   database)                                      000000    1042400
      616+ *   you'll need to call http_proxy_setauth()
                                             000000    1042500
      617+ *
                                              000000    1042600
      618+ *  Returns -1 upon error, or 0 if successful
                                             000000    1042700
      619+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1042800
      620+D http_proxy_getauth...
                                             000000    1042900
      621+D                 PR            10I 0
                                             000000    1043000
      622+D   peBasic                      1N
                                             000000    1043100
      623+D   peRealm                    124A
                                             000000    1043200
      624+
                                              000000    1043300
      625+
                                              000000    1043400
      626+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1043500
      627+ *  http_xproc():  Register a procedure to be called back at
                                              000000    1043600
      628+ *                 a given exit point
                                             000000    1043700
      629+ *
                                              000000    1043800
      630+ *     peExitPoint = exit point.  Should be one of the
   constants                                          000000    1043900
      631+ *                HTTP_POINT_XXX defined in the HTTPAPI_H
   member                                          000000    1044000
      632+ *          peProc = address of procedure to call for this
                                              000000    1044100
      633+ *                exit point. (pass *NULL to disable this
   point)                                          000000    1044200
      634+ *      peUserData = Pointer to user data. This will be passed
                                              000000    1044300
      635+ *                to your call-back procedure. You can set it
   to                                          000000    1044400
      636+ *                *NULL if you don't need/want it.
                                              000000    1044500
      637+ *
                                              000000    1044600
      638+ *  Returns -1 upon error, or 0 if successful
                                             000000    1044700
      639+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1044800
      640+D http_xproc      PR            10I 0
                                             000000    1044900
      641+D  peExitPoint                  10I 0 value
                                             000000    1045000
      642+D  peProc                         *   procptr value
                                             000000    1045100
      643+D  peUserData                     *   value options(*nopass)
                                              000000    1045200
      644+
                                              000000    1045300
      645+
                                              000000    1045400
      646+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1045500
      647+ * http_redir_loc(): Retrieve location provided by a redirect
                                             000000    1045600
      648+ *   request.
                                             000000    1045700
      649+ *
                                              000000    1045800
      650+ *  returns redirect location, or '' if no redirect was given
                                             000000    1045900
      651+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1046000
      652+D http_redir_loc  PR          1024A   varying
                                             000000    1046100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   14
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
      653+
                                              000000    1046200
      654+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1046300
      655+ * http_url_encoder_new():  Create a URL encoder.
                                             000000    1046400
      656+ *
                                              000000    1046500
      657+ *   returns an (opaque) pointer to the new encoder
                                             000000    1046600
      658+ *           or *NULL upon error.
                                             000000    1046700
      659+ *
                                              000000    1046800
      660+ * WARNING: To free the memory used by this routine, you MUST
                                             000000    1046900
      661+ *          call http_url_encoder_free() after the data is
   sent.                                          000000    1047000
      662+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1047100
      663+D HTTP_URL_ENCODER...
                                             000000    1047200
      664+D                 s               *
                                             000000    1047300
      665+D http_url_encoder_new...
                                             000000    1047400
      666+D                 PR                  like(HTTP_URL_ENCODER)
                                              000000    1047500
      667+ /if defined(WEBFORMS)
                                              070823    1047600
               LINES EXCLUDED: 3
      668+ /endif
                                             070823    1048000
      669+
                                              000000    1048100
      670+
                                              000000    1048200
      671+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1048300
      672+ * http_url_encoder_addvar():  Add a variable to what's stored
                                              000000    1048400
      673+ *          a URL encoder.
                                              000000    1048500
      674+ *
                                              000000    1048600
      675+ *    peEncoder = pointer to encoder created by the
                                             000000    1048700
      676+ *                  http_url_encoder_new() routine
                                              000000    1048800
      677+ *   peVariable = variable name to add
                                              000000    1048900
      678+ *       peData = pointer to data to store in variable
                                              000000    1049000
      679+ *   peDataSize = size of data to store in variable
                                             000000    1049100
      680+ *
                                              000000    1049200
      681+ * Returns *ON if successful, *OFF otherwise.
                                             000000    1049300
      682+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1049400
      683+D http_url_encoder_addvar...
                                              000000    1049500
      684+D                 PR             1N
                                             000000    1049600
      685+D    peEncoder                        like(HTTP_URL_ENCODER)
   value                                        000000    1049700
      686+D    peVariable                 50A   varying value
                                             000000    1049800
      687+D    peData                       *   value
                                             000000    1049900
      688+D    peDataSize                 10I 0 value
                                             000000    1050000
      689+ /if defined(WEBFORMS)
                                              070823    1050100
               LINES EXCLUDED: 6
      690+ /endif
                                             070823    1050800
      691+
                                              000000    1050900
      692+
                                              000000    1051000
      693+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1051100
      694+ * http_url_encoder_getptr(): Get a pointer to the encoded
                                              000000    1051200
      695+ *        data stored in a URL encoder
                                              000000    1051300
      696+ *
                                              000000    1051400
      697+ *     peEncoder = (input) pointer to encoder
                                             000000    1051500
      698+ *        peData = (output) pointer to encoded data
                                             000000    1051600
      699+ *        peSize = (output) size of encoded data
                                              000000    1051700
      700+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1051800
      701+D http_url_encoder_getptr...
                                              000000    1051900
      702+D                 PR
                                              000000    1052000
      703+D    peEncoder                        like(HTTP_URL_ENCODER)
   value                                        000000    1052100
      704+D    peData                       *
                                             000000    1052200
      705+D    peSize                     10I 0
                                             000000    1052300
      706+ /if defined(WEBFORMS)
                                              070823    1052400
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   15
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
               LINES EXCLUDED: 5
      707+ /endif
                                             070823    1053000
      708+
                                              000000    1053100
      709+
                                              000000    1053200
      710+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1053300
      711+ * http_url_encoder_getstr(): Get encoded data he encoded
                                             000000    1053400
      712+ *        data stored in a URL encoder as a string
                                              000000    1053500
      713+ *
                                              000000    1053600
      714+ *     peEncoder = (input) pointer to encoder
                                             000000    1053700
      715+ *
                                              000000    1053800
      716+ * NOTE: This routine is much slower than
   http_url_encoder_getptr()                                       000000
      1053900
      717+ *       and is limited to a 32k return value.  It's suitable
   for                                         000000    1054000
      718+ *       use with data that's added to a URL, such as when
                                              000000    1054100
      719+ *       performing a GET request to a web server, but you
   should                                         000000    1054200
      720+ *       use http_url_encoder_getptr() for POST requests.
                                             000000    1054300
      721+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1054400
      722+D http_url_encoder_getstr...
                                              000000    1054500
      723+D                 PR         32767A   varying
                                             000000    1054600
      724+D    peEncoder                        like(HTTP_URL_ENCODER)
   value                                        000000    1054700
      725+ /if defined(WEBFORMS)
                                              070823    1054800
               LINES EXCLUDED: 4
      726+ /endif
                                             070823    1055300
      727+
                                              000000    1055400
      728+
                                              000000    1055500
      729+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1055600
      730+ * http_url_encoder_free(): free resources allocated by both
                                              000000    1055700
      731+ *        http_url_encoder_new() and http_url_encoder_addvar()
                                              000000    1055800
      732+ *
                                              000000    1055900
      733+ *     peEncoder = pointer to encoder to free
                                             000000    1056000
      734+ *
                                              000000    1056100
      735+ * Returns *ON if successful, *OFF otherwise.
                                             000000    1056200
      736+ *
                                              000000    1056300
      737+ * WARNING: After calling this, do not use the encoder or
                                             000000    1056400
      738+ *          data returned by http_url_encoder_getptr() again.
                                             000000    1056500
      739+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1056600
      740+D http_url_encoder_free...
                                              000000    1056700
      741+D                 PR             1N
                                             000000    1056800
      742+D    peEncoder                        like(HTTP_URL_ENCODER)
   value                                        000000    1056900
      743+ /if defined(WEBFORMS)
                                              070823    1057000
               LINES EXCLUDED: 3
      744+ /endif
                                             070823    1057400
      745+
                                              000000    1057500
      746+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1057600
      747+ * http_url_encoder_addvar_s():  Simplified (but limited)
                                             000000    1057700
      748+ *       interface to http_url_encoder_addvar().
                                              000000    1057800
      749+ *
                                              000000    1057900
      750+ *    peEncoder = (input) HTTP_url_encoder object
                                             000000    1058000
      751+ *   peVariable = (input) variable name to set
                                              000000    1058100
      752+ *      peValue = (input) value to set variable to
                                              000000    1058200
      753+ *
                                              000000    1058300
      754+ * Returns *ON if successful, *OFF otherwise
                                              000000    1058400
      755+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1058500
      756+D http_url_encoder_addvar_s...
                                              000000    1058600
      757+D                 PR             1N
                                             000000    1058700
      758+D    peEncoder                        like(HTTP_URL_ENCODER)
   value                                        000000    1058800
      759+D    peVariable                 50A   varying value
                                             000000    1058900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   16
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
      760+D    peValue                   256A   varying value
                                             000000    1059000
      761+ /if defined(WEBFORMS)
                                              070823    1059100
               LINES EXCLUDED: 5
      762+ /endif
                                             070823    1059700
      763+
                                              000000    1059800
      764+
                                              000000    1059900
      765+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1060000
      766+ *  http_long_ParseURL(): Parse URL into it's component parts
                                             000000    1060100
      767+ *
                                              000000    1060200
      768+ *  Breaks a uniform resource locator (URL) into it's component
                                             000000    1060300
      769+ *  pieces for use with the http: or https: protocols.  (would
   also                                       000000    1060400
      770+ *  work for FTP with minor tweaks)
                                             000000    1060500
      771+ *
                                              000000    1060600
      772+ *  peURL = URL that needs to be parsed.
                                              000000    1060700
      773+ *  peService = service name from URL (i.e. http or https)
                                              000000    1060800
      774+ *  peUserName = user name given, or *blanks
                                              000000    1060900
      775+ *  pePassword = password given, or *blanks
                                             000000    1061000
      776+ *  peHost = hostname given in URL. (could be domain name or
   IP)                                          000000    1061100
      777+ *  pePort = port number to connect to, if specified, otherwise
   0.                                        000000    1061200
      778+ *  pePath = remaining path/request for server.
                                             000000    1061300
      779+ *
                                              000000    1061400
      780+ *  returns -1 upon failure, or 0 upon success
                                              000000    1061500
      781+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1061600
      782+d http_long_ParseURL...
                                             000000    1061700
      783+D                 PR            10I 0
                                             000000    1061800
      784+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1061900
      785+D  peService                    32A
                                             000000    1062000
      786+D  peUserName                   32A
                                             000000    1062100
      787+D  pePassword                   32A
                                             000000    1062200
      788+D  peHost                      256A
                                             000000    1062300
      789+D  pePort                       10I 0
                                             000000    1062400
      790+D  pePath                    32767A   varying
                                             000000    1062500
      791+
                                              000000    1062600
      792+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1062700
      793+ * http_select_commdriver():  Select & initialize
   communications                                          000000
   1062800
      794+ *    driver.
                                             000000    1062900
      795+ *
                                              000000    1063000
      796+ *      peCommType = (input) communications type (http/https)
                                             000000    1063100
      797+ *
                                              000000    1063200
      798+ * Returns pointer to comm driver, or *NULL upon failure
                                              000000    1063300
      799+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1063400
      800+D http_select_commdriver...
                                             000000    1063500
      801+D                 PR              *
                                             000000    1063600
      802+D   peCommType                  32A   const
                                             000000    1063700
      803+
                                              000000    1063800
      804+
                                              000000    1063900
      805+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1064000
      806+ *  http_url_post_raw2(): Post data to CGI script and get
   document                                        000000    1064100
      807+ *
                                              000000    1064200
      808+ *         peURL = url to post to
   ([6]http://www.blah.com/cgi-bin/etc)
       000000    1064300
      809+ *      pePostFD = descriptor number to pass to pePostProc
                                              000000    1064400
      810+ *    pePostProc = procedure to call to get POST data.
                                              000000    1064500
      811+ *     peDataLen = total length of data that will be sent.
                                              000000    1064600
      812+ *      peSaveFD = FD to pass back to peSaveProc
                                              000000    1064700
      813+ *    peSaveProc = procedure to call each time data is
   received.                                          000000    1064800
      814+ *    peTimeout  = (optional) give up if no data is received
   for                                          000000    1064900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   17
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
      815+ *            this many seconds.
                                              000000    1065000
      816+ * peUserAgent = (optional) User-Agent string passed to the
                                             000000    1065100
      817+ *            server.  Pass the named constant HTTP_USERAGENT
                                             000000    1065200
      818+ *            if you want to get the default value.
                                             000000    1065300
      819+ * peContentType = (optional) content type to supply (mainly
                                              000000    1065400
      820+ *            useful when talking to CGI scripts)
                                             000000    1065500
      821+ *  peSOAPAction = (optional) string used to specify the action
                                             000000    1065600
      822+ *          taken by some SOAP applications.
                                              000000    1065700
      823+ *
                                              000000    1065800
      824+ *  Returns  -1 upon failure, 0 upon timeout, or an HTTP
   response code                                    000000    1065900
      825+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1066000
      826+D http_url_post_raw2...
                                             000000    1066100
      827+D                 PR            10I 0
                                             000000    1066200
      828+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1066300
      829+D  pePostFD                     10I 0 value
                                             000000    1066400
      830+D  pePostProc                     *   procptr value
                                             000000    1066500
      831+D  peDataLen                    10I 0 value
                                             000000    1066600
      832+D  peSaveFD                     10I 0 value
                                             000000    1066700
      833+D  peSaveProc                     *   value procptr
                                             000000    1066800
      834+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1066900
      835+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1067000
      836+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1067100
      837+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1067200
      838+
                                              000000    1067300
      839+
                                              000000    1067400
      840+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1067500
      841+ *  http_url_post_stmf(): Post data to CGI script from stream
   file                                        000000    1067600
      842+ *
                                              000000    1067700
      843+ *         peURL = url to post to
   ([7]http://www.blah.com/cgi-bin/etc)
       000000    1067800
      844+ *    pePostFile = Filename (in IFS) of file to send to http
   server                                       000000    1067900
      845+ *    peRecvFile = Filename (in IFS) of stream file containing
   reply                                      000000    1068000
      846+ *    peTimeout  = (optional) give up if no data is received
   for                                          000000    1068100
      847+ *            this many seconds.
                                              000000    1068200
      848+ * peUserAgent = (optional) User-Agent string passed to the
                                             000000    1068300
      849+ *            server.  Pass the named constant HTTP_USERAGENT
                                             000000    1068400
      850+ *            if you want to get the default value.
                                             000000    1068500
      851+ * peContentType = (optional) content type to supply (mainly
                                              000000    1068600
      852+ *            useful when talking to CGI scripts)
                                             000000    1068700
      853+ *  peSOAPAction = (optional) string used to specify the action
                                             000000    1068800
      854+ *          taken by some SOAP applications.
                                              000000    1068900
      855+ *
                                              000000    1069000
      856+ *  Returns  -1 upon failure, 0 upon timeout,
                                             000000    1069100
      857+ *            1 for success, or an HTTP response code
                                             000000    1069200
      858+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1069300
      859+D http_url_post_stmf...
                                             000000    1069400
      860+D                 PR            10I 0
                                             000000    1069500
      861+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1069600
      862+D  pePostFile                32767A   varying const
   options(*varsize)                                     000000
   1069700
      863+D  peRecvFile                32767A   varying const
   options(*varsize)                                     000000
   1069800
      864+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1069900
      865+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1070000
      866+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1070100
      867+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1070200
      868+D http_post_stmf  PR            10I 0
   extproc('HTTP_URL_POST_STMF')
   000000    1070300
      869+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1070400
      870+D  pePostFile                32767A   varying const
   options(*varsize)                                     000000
   1070500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   18
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
      871+D  peRecvFile                32767A   varying const
   options(*varsize)                                     000000
   1070600
      872+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1070700
      873+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1070800
      874+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1070900
      875+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1071000
      876+
                                              000000    1071100
      877+
                                              000000    1071200
      878+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1071300
      879+ * http_get_xml();
                                              000000    1071400
      880+ * http_url_get_xml():  Send a GET request to an HTTP server
   and                                          000000    1071500
      881+ *     receive/parse an XML response.
                                             000000    1071600
      882+ *
                                              000000    1071700
      883+ *       peURL = (input) URL to perform GET request to
                                              000000    1071800
      884+ * peStartProc = (input) call-back procedure to call at the
   start                                         000000    1071900
      885+ *                       of each XML element received.
                                              000000    1072000
      886+ *   peEndProc = (input) call-back procedure to call at the end
                                             000000    1072100
      887+ *                       of each XML element received.
                                              000000    1072200
      888+ *    peUsrDta = (input) user-defined data that will be passed
   to the                                     000000    1072300
      889+ *                    call-back routine
                                             000000    1072400
      890+ *
                                              000000    1072500
      891+ * (other parms are identical to those in HTTP_url_get())
                                             000000    1072600
      892+ *
                                              000000    1072700
      893+ * peStartProc should point to a procedure with a procedure
                                             000000    1072800
      894+ * interface that's compatable with the following:
                                              000000    1072900
      895+ *
                                              000000    1073000
      896+ *  D StartProc       PR
                                              000000    1073100
      897+ *  D   userdata                      *   value
                                             000000    1073200
      898+ *  D   depth                       10I 0 value
                                             000000    1073300
      899+ *  D   name                      1024A   varying const
                                             000000    1073400
      900+ *  D   path                     24576A   varying const
                                             000000    1073500
      901+ *  D   attrs                         *   dim(32767)
                                              000000    1073600
      902+ *  D                                     const
   options(*varsize)                                         000000
   1073700
      903+ *
                                              000000    1073800
      904+ * peEndProc should point to a procedure with a procedure
                                             000000    1073900
      905+ * interface that's compatable with the following:
                                              000000    1074000
      906+ *
                                              000000    1074100
      907+ *  D EndProc         PR
                                              000000    1074200
      908+ *  D   userdata                      *   value
                                             000000    1074300
      909+ *  D   depth                       10I 0 value
                                             000000    1074400
      910+ *  D   name                      1024A   varying const
                                             000000    1074500
      911+ *  D   path                     24576A   varying const
                                             000000    1074600
      912+ *  D   value                    32767A   varying const
                                             000000    1074700
      913+ *  D   attrs                         *   dim(32767)
                                              000000    1074800
      914+ *  D                                     const
   options(*varsize)                                         000000
   1074900
      915+ *
                                              000000    1075000
      916+ *  Returns 1 if successful, -1 upon error, 0 if timeout
                                              000000    1075100
      917+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1075200
      918+D http_get_xml...
                                             000000    1075300
      919+D                 PR            10I 0
   EXTPROC('HTTP_URL_GET_XML')
   000000    1075400
      920+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1075500
      921+D  peStartProc                    *   value procptr
                                             000000    1075600
      922+D  peEndProc                      *   value procptr
                                             000000    1075700
      923+D  peUsrDta                       *   value
                                             000000    1075800
      924+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1075900
      925+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1076000
      926+D  peModTime                      Z   const
   options(*nopass:*omit)                                        000000
    1076100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   19
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
      927+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1076200
      928+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1076300
      929+D http_url_get_xml...
                                             000000    1076400
      930+D                 PR            10I 0
                                             000000    1076500
      931+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1076600
      932+D  peStartProc                    *   value procptr
                                             000000    1076700
      933+D  peEndProc                      *   value procptr
                                             000000    1076800
      934+D  peUsrDta                       *   value
                                             000000    1076900
      935+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1077000
      936+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1077100
      937+D  peModTime                      Z   const
   options(*nopass:*omit)                                        000000
    1077200
      938+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1077300
      939+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1077400
      940+
                                              000000    1077500
      941+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1077600
      942+ *  http_get_xmltf(): Request URL from server. Receive response
                                             000000    1077700
      943+ *        to temporary file, then parse it.
                                             000000    1077800
      944+ *
                                              000000    1077900
      945+ *       peURL = (input) URL to perform GET request to
                                              000000    1078000
      946+ * peStartProc = (input) call-back procedure to call at the
   start                                         000000    1078100
      947+ *                       of each XML element received.
                                              000000    1078200
      948+ *   peEndProc = (input) call-back procedure to call at the end
                                             000000    1078300
      949+ *                       of each XML element received.
                                              000000    1078400
      950+ *    peUsrDta = (input) user-defined data that will be passed
   to the                                     000000    1078500
      951+ *                    call-back routine
                                             000000    1078600
      952+ *
                                              000000    1078700
      953+ * (other parms are identical to those in HTTP_url_get())
                                             000000    1078800
      954+ *
                                              000000    1078900
      955+ *  Returns 1 if successful, -1 upon error, 0 if timeout
                                              000000    1079000
      956+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1079100
      957+D http_get_xmltf...
                                             000000    1079200
      958+D                 PR            10I 0
                                             000000    1079300
      959+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1079400
      960+D  peStartProc                    *   value procptr
                                             000000    1079500
      961+D  peEndProc                      *   value procptr
                                             000000    1079600
      962+D  peUsrDta                       *   value
                                             000000    1079700
      963+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1079800
      964+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1079900
      965+D  peModTime                      Z   const
   options(*nopass:*omit)                                        000000
    1080000
      966+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1080100
      967+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1080200
      968+
                                              000000    1080300
      969+
                                              000000    1080400
      970+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1080500
      971+ * http_post_xml();
                                             000000    1080600
      972+ * http_url_post_xml():  Send a POST request to an HTTP server
   and                                        000000    1080700
      973+ *     receive/parse an XML response.
                                             000000    1080800
      974+ *
                                              000000    1080900
      975+ *          peURL = (input) URL to perform GET request to
                                             000000    1081000
      976+ *     pePostData = (input) data to POST to the web server
                                              000000    1081100
      977+ *  pePostDataLen = (input) length of pePostData
                                              000000    1081200
      978+ * peStartProc = (input) call-back procedure to call at the
   start                                         000000    1081300
      979+ *                       of each XML element received.
                                              000000    1081400
      980+ *   peEndProc = (input) call-back procedure to call at the end
                                             000000    1081500
      981+ *                       of each XML element received.
                                              000000    1081600
      982+ *       peUsrDta = (input) user-defined data that will be
   passed                                         000000    1081700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   20
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
      983+ *                          to the call-back routine
                                              000000    1081800
      984+ *
                                              000000    1081900
      985+ * (other parms are identical to those in HTTP_url_post())
                                              000000    1082000
      986+ *
                                              000000    1082100
      987+ * peStartProc should point to a procedure with a procedure
                                             000000    1082200
      988+ * interface that's compatable with the following:
                                              000000    1082300
      989+ *
                                              000000    1082400
      990+ *  D StartProc       PR
                                              000000    1082500
      991+ *  D   userdata                      *   value
                                             000000    1082600
      992+ *  D   depth                       10I 0 value
                                             000000    1082700
      993+ *  D   name                      1024A   varying const
                                             000000    1082800
      994+ *  D   path                     24576A   varying const
                                             000000    1082900
      995+ *  D   attrs                         *   dim(32767)
                                              000000    1083000
      996+ *  D                                     const
   options(*varsize)                                         000000
   1083100
      997+ *
                                              000000    1083200
      998+ * peEndProc should point to a procedure with a procedure
                                             000000    1083300
      999+ * interface that's compatable with the following:
                                              000000    1083400
     1000+ *
                                              000000    1083500
     1001+ *  D EndProc         PR
                                              000000    1083600
     1002+ *  D   userdata                      *   value
                                             000000    1083700
     1003+ *  D   depth                       10I 0 value
                                             000000    1083800
     1004+ *  D   name                      1024A   varying const
                                             000000    1083900
     1005+ *  D   path                     24576A   varying const
                                             000000    1084000
     1006+ *  D   value                    32767A   varying const
                                             000000    1084100
     1007+ *  D   attrs                         *   dim(32767)
                                              000000    1084200
     1008+ *  D                                     const
   options(*varsize)                                         000000
   1084300
     1009+ *
                                              000000    1084400
     1010+ *  Returns 1 if successful, -1 upon error, 0 if timeout
                                              000000    1084500
     1011+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1084600
     1012+D http_post_xml...
                                              000000    1084700
     1013+D                 PR            10I 0
   EXTPROC('HTTP_URL_POST_XML')
   000000    1084800
     1014+D  peURL                     32767A   varying const
   options(*varsize)                               1     070724
   1084900
     1015+D  pePostData                     *   value
                                       2     070724    1085000
     1016+D  pePostDataLen                10I 0 value
                                       3     070724    1085100
     1017+D  peStartProc                    *   value procptr
                                       4     070724    1085200
     1018+D  peEndProc                      *   value procptr
                                       5     070724    1085300
     1019+D  peUsrDta                       *   value
                                       6     070724    1085400
     1020+D  peTimeout                    10I 0 value options(*nopass)
                                        7     070724    1085500
     1021+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                  8     070724
    1085600
     1022+D  peContentType                64A   const
   options(*nopass:*omit)                                  9     070724
    1085700
     1023+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                  10    070724
    1085800
     1024+D http_url_post_xml...
                                              000000    1085900
     1025+D                 PR            10I 0
                                             000000    1086000
     1026+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1086100
     1027+D  pePostData                     *   value
                                             000000    1086200
     1028+D  pePostDataLen                10I 0 value
                                             000000    1086300
     1029+D  peStartProc                    *   value procptr
                                             000000    1086400
     1030+D  peEndProc                      *   value procptr
                                             000000    1086500
     1031+D  peUsrDta                       *   value
                                             000000    1086600
     1032+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1086700
     1033+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1086800
     1034+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1086900
     1035+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1087000
     1036+
                                              000000    1087100
     1037+
                                              000000    1087200
     1038+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1087300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   21
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1039+ *  http_post_xmltf(): Post data from memory. Receive
                                             000000    1087400
     1040+ *        response to temporary file, then parse it.
                                              000000    1087500
     1041+ *
                                              000000    1087600
     1042+ *          peURL = (input) URL to perform GET request to
                                             000000    1087700
     1043+ *     pePostData = (input) data to POST to the web server
                                              000000    1087800
     1044+ *  pePostDataLen = (input) length of pePostData
                                              000000    1087900
     1045+ * peStartProc = (input) call-back procedure to call at the
   start                                         000000    1088000
     1046+ *                       of each XML element received.
                                              000000    1088100
     1047+ *   peEndProc = (input) call-back procedure to call at the end
                                             000000    1088200
     1048+ *                       of each XML element received.
                                              000000    1088300
     1049+ *       peUsrDta = (input) user-defined data that will be
   passed                                         000000    1088400
     1050+ *                          to the call-back routine
                                              000000    1088500
     1051+ *
                                              000000    1088600
     1052+ * (other parms are identical to those in HTTP_url_post())
                                              000000    1088700
     1053+ *
                                              000000    1088800
     1054+ *  Returns 1 if successful, -1 upon error, 0 if timeout
                                              000000    1088900
     1055+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1089000
     1056+D http_post_xmltf...
                                              000000    1089100
     1057+D                 PR            10I 0
                                             000000    1089200
     1058+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1089300
     1059+D  pePostData                     *   value
                                             000000    1089400
     1060+D  pePostDataLen                10I 0 value
                                             000000    1089500
     1061+D  peStartProc                    *   value procptr
                                             000000    1089600
     1062+D  peEndProc                      *   value procptr
                                             000000    1089700
     1063+D  peUsrDta                       *   value
                                             000000    1089800
     1064+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1089900
     1065+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1090000
     1066+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1090100
     1067+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1090200
     1068+
                                              000000    1090300
     1069+
                                              000000    1090400
     1070+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1090500
     1071+ *  http_post_stmf_xml();
                                             000000    1090600
     1072+ *  http_url_post_stmf_xml(): Post data to CGI script from
   stream file                                    000000    1090700
     1073+ *        and receive/parse an XML response
                                             000000    1090800
     1074+ *
                                              000000    1090900
     1075+ *       peURL = (input) URL to post to
                                             000000    1091000
     1076+ *  pePostFile = (input) File of stream file (in IFS) to post
                                             000000    1091100
     1077+ * peStartProc = (input) call-back procedure to call at the
   start                                         000000    1091200
     1078+ *                       of each XML element received.
                                              000000    1091300
     1079+ *   peEndProc = (input) call-back procedure to call at the end
                                             000000    1091400
     1080+ *                       of each XML element received.
                                              000000    1091500
     1081+ *    peUsrDta = (input) user-defined data that will be passed
                                              000000    1091600
     1082+ *                          to the call-back routine
                                              000000    1091700
     1083+ *  peTimeout  = (optional) give up if no data is received for
                                              000000    1091800
     1084+ *                       this many seconds.
                                             000000    1091900
     1085+ * peUserAgent = (optional) User-Agent string passed to the
                                             000000    1092000
     1086+ *            server.  Pass the named constant HTTP_USERAGENT
                                             000000    1092100
     1087+ *            if you want to get the default value.
                                             000000    1092200
     1088+ * peContentType = (optional) content type to supply (mainly
                                              000000    1092300
     1089+ *                       useful when talking to CGI scripts)
                                              000000    1092400
     1090+ *  peSOAPAction = (optional) string used to specify the action
                                             000000    1092500
     1091+ *          taken by some SOAP applications.
                                              000000    1092600
     1092+ *
                                              000000    1092700
     1093+ *  Returns  -1 upon failure, 0 upon timeout,
                                             000000    1092800
     1094+ *            1 for success, or an HTTP response code
                                             000000    1092900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   22
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1095+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1093000
     1096+D http_post_stmf_xml...
                                             000000    1093100
     1097+D                 PR            10I 0
   extproc('HTTP_URL_POST_STMF_XML')
   000000    1093200
     1098+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1093300
     1099+D  pePostFile                32767A   varying const
   options(*varsize)                                     000000
   1093400
     1100+D  peStartProc                    *   value procptr
                                             000000    1093500
     1101+D  peEndProc                      *   value procptr
                                             000000    1093600
     1102+D  peUsrDta                       *   value
                                             000000    1093700
     1103+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1093800
     1104+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1093900
     1105+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1094000
     1106+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1094100
     1107+D http_url_post_stmf_xml...
                                             000000    1094200
     1108+D                 PR            10I 0
                                             000000    1094300
     1109+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1094400
     1110+D  pePostFile                32767A   varying const
   options(*varsize)                                     000000
   1094500
     1111+D  peStartProc                    *   value procptr
                                             000000    1094600
     1112+D  peEndProc                      *   value procptr
                                             000000    1094700
     1113+D  peUsrDta                       *   value
                                             000000    1094800
     1114+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1094900
     1115+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1095000
     1116+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1095100
     1117+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1095200
     1118+
                                              000000    1095300
     1119+
                                              000000    1095400
     1120+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1095500
     1121+ *  http_post_stmf_xmltf(): Post data from stream file.
   Receive                                          000000    1095600
     1122+ *        response to temporary file, then parse it.
                                              000000    1095700
     1123+ *
                                              000000    1095800
     1124+ *       peURL = (input) URL to post to
                                             000000    1095900
     1125+ *  pePostFile = (input) File of stream file (in IFS) to post
                                             000000    1096000
     1126+ * peStartProc = (input) call-back procedure to call at the
   start                                         000000    1096100
     1127+ *                       of each XML element received.
                                              000000    1096200
     1128+ *   peEndProc = (input) call-back procedure to call at the end
                                             000000    1096300
     1129+ *                       of each XML element received.
                                              000000    1096400
     1130+ *    peUsrDta = (input) user-defined data that will be passed
                                              000000    1096500
     1131+ *                          to the call-back routine
                                              000000    1096600
     1132+ *  peTimeout  = (optional) give up if no data is received for
                                              000000    1096700
     1133+ *                       this many seconds.
                                             000000    1096800
     1134+ * peContentType = (optional) content type to supply (mainly
                                              000000    1096900
     1135+ *                       useful when talking to CGI scripts)
                                              000000    1097000
     1136+ *
                                              000000    1097100
     1137+ *  Returns  -1 upon failure, 0 upon timeout,
                                             000000    1097200
     1138+ *            1 for success, or an HTTP response code
                                             000000    1097300
     1139+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1097400
     1140+D http_post_stmf_xmltf...
                                             000000    1097500
     1141+D                 PR            10I 0
                                             000000    1097600
     1142+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1097700
     1143+D  pePostFile                32767A   varying const
   options(*varsize)                                     000000
   1097800
     1144+D  peStartProc                    *   value procptr
                                             000000    1097900
     1145+D  peEndProc                      *   value procptr
                                             000000    1098000
     1146+D  peUsrDta                       *   value
                                             000000    1098100
     1147+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1098200
     1148+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1098300
     1149+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1098400
     1150+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1098500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   23
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1151+
                                              000000    1098600
     1152+
                                              000000    1098700
     1153+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1098800
     1154+ *  http_persist_open(): Open a persistent HTTP session
                                             000000    1098900
     1155+ *
                                              000000    1099000
     1156+ *       peURL = url to connect to
                                              000000    1099100
     1157+ *  peTimeout  = (optional) give up if no data is received for
                                              000000    1099200
     1158+ *          this many seconds.
                                              000000    1099300
     1159+ *
                                              000000    1099400
     1160+ *  Returns *NULL upon failure, or
                                              000000    1099500
     1161+ *          pointer to HTTP communication session
                                             000000    1099600
     1162+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1099700
     1163+D http_persist_open...
                                              000000    1099800
     1164+D                 PR              *
                                             000000    1099900
     1165+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1100000
     1166+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1100100
     1167+
                                              000000    1100200
     1168+
                                              000000    1100300
     1169+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1100400
     1170+ *  http_persist_get(): Get a file using a persistent HTTP
   session                                        000000    1100500
     1171+ *
                                              000000    1100600
     1172+ *         peComm = (input) pointer to persistent HTTP comm
   session                                       000000    1100700
     1173+ *          peURL = (input) URL to get from persistent HTTP
                                             000000    1100800
     1174+ *           peFD = (input) FD to pass back to peProc
                                             000000    1100900
     1175+ *         peProc = (input) procedure to call each time data is
                                             000000    1101000
     1176+ *                          received.
                                             000000    1101100
     1177+ *      peTimeout = (input/optional) time-out when no data is
   received                                    000000    1101200
     1178+ *                          for this many seconds.
                                              000000    1101300
     1179+ *    peUserAgent = (optional) User-Agent string passed to the
                                              000000    1101400
     1180+ *                          server.  Pass the named constant
   called                                       000000    1101500
     1181+ *                          HTTP_USERAGENT if you want to get
   the                                         000000    1101600
     1182+ *                          default value.
                                              000000    1101700
     1183+ *      peModTime = (input/optional) only get file if it was
   changed                                      000000    1101800
     1184+ *                          since this timestamp.
                                             000000    1101900
     1185+ *  peContentType = (input/optional) content type to supply
   (mainly                                       000000    1102000
     1186+ *                          useful when talking to CGI scripts)
                                             000000    1102100
     1187+ *   peSOAPAction = (input/optional) string to send in the
   SOAPAction:                                    000000    1102200
     1188+ *                          HTTP header when making a SOAP
   request.                                       000000    1102300
     1189+ *
                                              000000    1102400
     1190+ *  Returns  1 if successful,
                                             000000    1102500
     1191+ *           0 if timed out
                                             000000    1102600
     1192+ *          -1 if an internal error occurs
                                              000000    1102700
     1193+ *          or an HTTP response code if an error comes from the
   server                                    000000    1102800
     1194+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1102900
     1195+D http_persist_get...
                                             000000    1103000
     1196+D                 PR            10I 0
                                             000000    1103100
     1197+D  peComm                         *   value
                                             000000    1103200
     1198+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1103300
     1199+D  peFD                         10I 0 value
                                             000000    1103400
     1200+D  peProc                         *   value procptr
                                             000000    1103500
     1201+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1103600
     1202+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1103700
     1203+D  peModTime                      Z   const
   options(*nopass:*omit)                                        000000
    1103800
     1204+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1103900
     1205+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1104000
     1206+
                                              000000    1104100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   24
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1207+
                                              000000    1104200
     1208+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1104300
     1209+ *  http_persist_post(): Post data to CGI script and get
   document                                         000000    1104400
     1210+ *                       using a persistent connection
                                              000000    1104500
     1211+ *
                                              000000    1104600
     1212+ *         peComm = (input) pointer to persistent HTTP comm
   session                                       000000    1104700
     1213+ *          peURL = (input) URL to post to with persistent HTTP
                                             000000    1104800
     1214+ * --------
                                             000000    1104900
     1215+ *       pePostFD = (input) Opaque integer to pass to
   pePostProc                                          000000    1105000
     1216+ *     pePostProc = (input) Pointer to call-back procedure for
                                              000000    1105100
     1217+ *                          posting data to server.  If you
   pass                                          000000    1105200
     1218+ *                          *NULL for this, you should use
   pePostData                                     000000    1105300
     1219+ *                          instead.
                                              000000    1105400
     1220+ * -- or --
                                             000000    1105500
     1221+ *     pePostData = (input) Pointer to data to post.  If you
   pass                                         000000    1105600
     1222+ *                          *NULL for this, you should use
   pePostProc                                     000000    1105700
     1223+ *                          instead.
                                              000000    1105800
     1224+ * --------
                                             000000    1105900
     1225+ *  pePostDataLen = (input) Total length, in bytes, of post
   data.                                         000000    1106000
     1226+ *       peSaveFD = (input) Opaque integer passed to peSaveProc
                                             000000    1106100
     1227+ *     peSaveProc = (input) Pointer to call-back procedure that
   is                                        000000    1106200
     1228+ *                          called when data is received from
   HTTP                                        000000    1106300
     1229+ *                          server.
                                             000000    1106400
     1230+ *      peTimeout = (input/optional) time-out when no data is
   received                                    000000    1106500
     1231+ *                          for this many seconds.
                                              000000    1106600
     1232+ *    peUserAgent = (optional) User-Agent string passed to the
                                              000000    1106700
     1233+ *                          server.  Pass the named constant
   called                                       000000    1106800
     1234+ *                          HTTP_USERAGENT if you want to get
   the                                         000000    1106900
     1235+ *                          default value.
                                              000000    1107000
     1236+ *  peContentType = (input/optional) content type to supply
   (mainly                                       000000    1107100
     1237+ *                          useful when talking to CGI scripts)
                                             000000    1107200
     1238+ *   peSOAPAction = (input/optional) string to send in the
   SOAPAction:                                    000000    1107300
     1239+ *                          HTTP header when making a SOAP
   request.                                       000000    1107400
     1240+ *
                                              000000    1107500
     1241+ *  Returns  1 if successful,
                                             000000    1107600
     1242+ *           0 if timed out
                                             000000    1107700
     1243+ *          -1 if an internal error occurs
                                              000000    1107800
     1244+ *          or an HTTP response code if an error comes from the
   server                                    000000    1107900
     1245+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1108000
     1246+D http_persist_post...
                                              000000    1108100
     1247+D                 PR            10I 0
                                             000000    1108200
     1248+D  peComm                         *   value
                                             000000    1108300
     1249+D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   1108400
     1250+D  pePostFD                     10I 0 value
                                             000000    1108500
     1251+D  pePostProc                     *   value procptr
                                             000000    1108600
     1252+D  pePostData                     *   value
                                             000000    1108700
     1253+D  pePostDataLen                10I 0 value
                                             000000    1108800
     1254+D  peSaveFD                     10I 0 value
                                             000000    1108900
     1255+D  peSaveProc                     *   value procptr
                                             000000    1109000
     1256+D  peTimeout                    10I 0 value options(*nopass)
                                              000000    1109100
     1257+D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
    1109200
     1258+D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
    1109300
     1259+D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
    1109400
     1260+
                                              000000    1109500
     1261+
                                              000000    1109600
     1262+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1109700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   25
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1263+ *  http_persist_close(): End a persistent HTTP session
                                             000000    1109800
     1264+ *
                                              000000    1109900
     1265+ *     peComm = (input) pointer to persistent HTTP comm session
                                             000000    1110000
     1266+ *
                                              000000    1110100
     1267+ *  returns 0 if successful, -1 otherwise
                                             000000    1110200
     1268+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1110300
     1269+D http_persist_close...
                                             000000    1110400
     1270+D                 PR            10I 0
                                             000000    1110500
     1271+D  peComm                         *   value
                                             000000    1110600
     1272+
                                              000000    1110700
     1273+
                                              000000    1110800
     1274+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1110900
     1275+ * http_mfd_encoder_open(): Create a multipart/form-data
   encoder                                          000000    1111000
     1276+ *
                                              000000    1111100
     1277+ * A multipart/form-data encoder will encode the variables
                                              000000    1111200
     1278+ * and or stream files that you pass to it and store the
   results                                          000000    1111300
     1279+ * in a stream file.  You can later POST those results with the
                                             000000    1111400
     1280+ * http_url_post_stmf() API.
                                              000000    1111500
     1281+ *
                                              000000    1111600
     1282+ *   peStmFile = (input) pathname to stream file to store
                                             000000    1111700
     1283+ *               encoded results.
                                             000000    1111800
     1284+ *
                                              000000    1111900
     1285+ *   returns an (opaque) pointer to the new encoder
                                             000000    1112000
     1286+ *           or *NULL upon error.
                                             000000    1112100
     1287+ *
                                              000000    1112200
     1288+ * WARNING: To free the memory used by this routine and close
                                             000000    1112300
     1289+ *          the stream file, you MUST call
   http_mfd_encoder_close()                                       000000
      1112400
     1290+ *          after the data is sent.
                                             000000    1112500
     1291+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1112600
     1292+D http_mfd_encoder_open...
                                              000000    1112700
     1293+D                 PR              *
                                             000000    1112800
     1294+D  peStmFile                      *   value options(*string)
                                              000000    1112900
     1295+D  peContType                   64A
                                             000000    1113000
     1296+
                                              000000    1113100
     1297+
                                              000000    1113200
     1298+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1113300
     1299+ * http_mfd_encoder_addvar():  Add a variable to what's stored
                                              000000    1113400
     1300+ *          a multipart/form-data encoder.
                                              000000    1113500
     1301+ *
                                              000000    1113600
     1302+ *    peEncoder = pointer to encoder created by the
                                             000000    1113700
     1303+ *                  http_mfd_encoder_open() routine
                                             000000    1113800
     1304+ *   peVariable = variable name to add
                                              000000    1113900
     1305+ *       peData = pointer to data to store in variable
                                              000000    1114000
     1306+ *   peDataSize = size of data to store in variable
                                             000000    1114100
     1307+ *
                                              000000    1114200
     1308+ * Returns *ON if successful, *OFF otherwise.
                                             000000    1114300
     1309+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1114400
     1310+D http_mfd_encoder_addvar...
                                              000000    1114500
     1311+D                 PR             1N
                                             000000    1114600
     1312+D    peEncoder                    *   value
                                             000000    1114700
     1313+D    peVariable                 50A   varying value
                                             000000    1114800
     1314+D    peData                       *   value
                                             000000    1114900
     1315+D    peDataSize                 10I 0 value
                                             000000    1115000
     1316+
                                              000000    1115100
     1317+
                                              000000    1115200
     1318+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1115300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   26
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1319+ * http_mfd_encoder_addvar_s():  Simplified (but limited)
                                             000000    1115400
     1320+ *       interface to http_mfd_encoder_addvar().
                                              000000    1115500
     1321+ *
                                              000000    1115600
     1322+ *    peEncoder = (input) HTTP_mfd_encoder object
                                             000000    1115700
     1323+ *   peVariable = (input) variable name to set
                                              000000    1115800
     1324+ *      peValue = (input) value to set variable to
                                              000000    1115900
     1325+ *
                                              000000    1116000
     1326+ * Returns *ON if successful, *OFF otherwise
                                              000000    1116100
     1327+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1116200
     1328+D http_mfd_encoder_addvar_s...
                                              000000    1116300
     1329+D                 PR             1N
                                             000000    1116400
     1330+D    peEncoder                    *   value
                                             000000    1116500
     1331+D    peVariable                 50A   varying value
                                             000000    1116600
     1332+D    peValue                   256A   varying value
                                             000000    1116700
     1333+
                                              000000    1116800
     1334+
                                              000000    1116900
     1335+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1117000
     1336+ * http_mfd_encoder_addstmf(): Add a stream file to what's
   stored                                         000000    1117100
     1337+ *       in a multipart/form-data encoder.
                                              000000    1117200
     1338+ *
                                              000000    1117300
     1339+ *    peEncoder = pointer to encoder created by the
                                             000000    1117400
     1340+ *                  http_mfd_encoder_open() routine
                                             000000    1117500
     1341+ *   peVariable = variable name to add
                                              000000    1117600
     1342+ *   pePathName = Path name of stream file to add
                                             000000    1117700
     1343+ *   peContType = Content-type of stream file to add
                                              000000    1117800
     1344+ *
                                              000000    1117900
     1345+ * Returns *ON if successful, *OFF otherwise.
                                             000000    1118000
     1346+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1118100
     1347+D http_mfd_encoder_addstmf...
                                             000000    1118200
     1348+D                 PR             1N
                                             000000    1118300
     1349+D    peEncoder                    *   value
                                             000000    1118400
     1350+D    peVariable                 50A   varying value
                                             000000    1118500
     1351+D    pePathName                   *   value options(*string)
                                              000000    1118600
     1352+D    peContType                 64A   varying const
                                             000000    1118700
     1353+
                                              000000    1118800
     1354+
                                              000000    1118900
     1355+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1119000
     1356+ * http_mfd_encoder_close():  close an open multipart/form-data
                                             000000    1119100
     1357+ *                            encoder.
                                              000000    1119200
     1358+ *
                                              000000    1119300
     1359+ *     peEncoder = (input) encoder to close
                                             000000    1119400
     1360+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1119500
     1361+D http_mfd_encoder_close...
                                             000000    1119600
     1362+D                 PR
                                              000000    1119700
     1363+D  peEncoder                      *   value
                                             000000    1119800
     1364+
                                              000000    1119900
     1365+
                                              000000    1120000
     1366+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1120100
     1367+ * http_debug():  Turn debugging info *ON or *OFF
                                             000000    1120200
     1368+ *
                                              000000    1120300
     1369+ *      peStatus = (input) status (either *ON or *OFF)
                                              000000    1120400
     1370+ *
                                              000000    1120500
     1371+ *    peFilename = (input/optional) filename that debug info
   will be                                      000000    1120600
     1372+ *                    written to.  If not defined, the value
   from                                         000000    1120700
     1373+ *                    CONFIG_H is used.
                                             000000    1120800
     1374+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1120900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   27
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1375+D http_debug      PR
                                              000000    1121000
     1376+D   peStatus                     1N   const
                                             000000    1121100
     1377+D   peFilename                 500A   varying const
   options(*nopass)                                      000000
   1121200
     1378+
                                              000000    1121300
     1379+
                                              000000    1121400
     1380+ *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                             000000    1121500
     1381+ * HTTP_SetCCSIDs():  Set the CCSIDs used for ASCII/EBCDIC
                                              000000    1121600
     1382+ *                    translation
                                             000000    1121700
     1383+ *
                                              000000    1121800
     1384+ *     pePostRem = (input) Remote CCSID of POST data
                                              000000    1121900
     1385+ *     pePostLoc = (input) Local CCSID of POST data
                                             000000    1122000
     1386+ *     peProtRem = (input) Remote CCSID of Protocol data
                                              000000    1122100
     1387+ *     peProtLoc = (input) Local CCSID of Protocol data
                                             000000    1122200
     1388+ *
                                              000000    1122300
     1389+ * Returns 0 if successful, -1 otherwise
                                              000000    1122400
     1390+ *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                             000000    1122500
     1391+D HTTP_SetCCSIDs  PR            10I 0
                                             000000    1122600
     1392+D   pePostRem                   10I 0 value
                                             000000    1122700
     1393+D   pePostLoc                   10I 0 value
                                             000000    1122800
     1394+D   peProtRem                   10I 0 value options(*nopass)
                                              000000    1122900
     1395+D   peProtLoc                   10I 0 value options(*nopass)
                                              000000    1123000
     1396+
                                              000000    1123100
     1397+
                                              000000    1123200
     1398+ *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                             000000    1123300
     1399+ * HTTP_SetTables():  Set the translation tables used for
                                             000000    1123400
     1400+ *                    ASCII/EBCDIC translation
                                              000000    1123500
     1401+ *
                                              000000    1123600
     1402+ *     peASCII  = (input) Table for converting to ASCII
                                             000000    1123700
     1403+ *     peEBCDIC = (input) Table for converting to EBCDIC
                                              000000    1123800
     1404+ *
                                              000000    1123900
     1405+ * Returns 0 if successful, -1 otherwise
                                              000000    1124000
     1406+ *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                             000000    1124100
     1407+D HTTP_SetTables  PR            10I 0
                                             000000    1124200
     1408+D   peASCII                     10A   const
                                             000000    1124300
     1409+D   peEBCDIC                    10A   const
                                             000000    1124400
     1410+
                                              000000    1124500
     1411+
                                              000000    1124600
     1412+ *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                             000000    1124700
     1413+ * HTTP_SetFileCCSID(): Set the CCSID that downloaded stream
                                              000000    1124800
     1414+ *                      files get tagged with
                                             000000    1124900
     1415+ *
                                              000000    1125000
     1416+ *     peCCSID  = (input) New CCSID to assign
                                             000000    1125100
     1417+ *
                                              000000    1125200
     1418+ * NOTE: HTTPAPI does not do *any* translation of downloaded
                                              000000    1125300
     1419+ *       data. It only sets this number as part of the file's
                                             000000    1125400
     1420+ *       attributes.  You can change it with the CHGATR CL
                                              000000    1125500
     1421+ *       command.
                                             000000    1125600
     1422+ *
                                              000000    1125700
     1423+ * NOTE: The IFS did not support CCSIDs in V4R5 and earlier.
                                              000000    1125800
     1424+ *       On those releases, this API will be used to set the
                                              000000    1125900
     1425+ *       codepage rather than the CCSID.
                                              000000    1126000
     1426+ *
                                              000000    1126100
     1427+ * Returns 0 if successful, -1 otherwise
                                              000000    1126200
     1428+ *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                             000000    1126300
     1429+D HTTP_SetfileCCSID...
                                              000000    1126400
     1430+D                 PR
                                              000000    1126500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   28
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1431+D   peCCSID                     10I 0 value
                                             000000    1126600
     1432+
                                              000000    1126700
     1433+
                                              000000    1126800
     1434+ *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                             000000    1126900
     1435+ * HTTP_xlate():  Translate data from ASCII <--> EBCDIC
                                             000000    1127000
     1436+ *
                                              000000    1127100
     1437+ *       peSize = (input) Size of data to translate
                                             000000    1127200
     1438+ *       peData = (input) Data
                                              000000    1127300
     1439+ *  peDirection = (input) can be set to the TO_ASCII or
                                             000000    1127400
     1440+ *                         TO_EBCDIC constant.
                                              000000    1127500
     1441+ *
                                              000000    1127600
     1442+ * Returns 0 if successful, -1 upon failure
                                             000000    1127700
     1443+ *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                             000000    1127800
     1444+D HTTP_xlate      PR            10I 0
                                             000000    1127900
     1445+D   peSize                      10I 0 value
                                             000000    1128000
     1446+D   peData                   32766A   options(*varsize)
                                             000000    1128100
     1447+D   peDirection                  1A   const
                                             000000    1128200
     1448+
                                              000000    1128300
     1449+
                                              000000    1128400
     1450+ *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                             000000    1128500
     1451+ * HTTP_xlatep(): Translate data from ASCII <--> EBCDIC
                                             000000    1128600
     1452+ *                (using a pointer instead of a variable)
                                             000000    1128700
     1453+ *
                                              000000    1128800
     1454+ *       peSize = (input) Size of data to translate
                                             000000    1128900
     1455+ *       peData = (input) Data
                                              000000    1129000
     1456+ *  peDirection = (input) can be set to the TO_ASCII or
                                             000000    1129100
     1457+ *                         TO_EBCDIC constant.
                                              000000    1129200
     1458+ *
                                              000000    1129300
     1459+ * Returns 0 if successful, -1 upon failure
                                             000000    1129400
     1460+ *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                             000000    1129500
     1461+D HTTP_xlatep     PR            10I 0
                                             000000    1129600
     1462+D   peSize                      10I 0 value
                                             000000    1129700
     1463+D   peData                        *   value
                                             000000    1129800
     1464+D   peDirection                  1A   const
                                             000000    1129900
     1465+
                                              000000    1130000
     1466+
                                              000000    1130100
     1467+ *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                             000000    1130200
     1468+ * HTTP_xlatedyn: Translate data from ASCII <--> EBCDIC
                                             000000    1130300
     1469+ *                using a dynamically sized output buffer
                                             000000    1130400
     1470+ *
                                              000000    1130500
     1471+ *      peSize = (input) size of data to translate
                                              000000    1130600
     1472+ *      peData = (input) pointer to data to translate
                                             000000    1130700
     1473+ * peDirection = (input) TO_ASCII or TO_EBCDIC
                                              000000    1130800
     1474+ *    peOutput = (output) address of newly allocated memory
                                             000000    1130900
     1475+ *
                                              000000    1131000
     1476+ * returns the length of the translated data or -1 upon failure
                                             000000    1131100
     1477+ *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                             000000    1131200
     1478+D HTTP_xlatedyn   PR            10I 0
                                             000000    1131300
     1479+D   peSize                      10I 0 value
                                             000000    1131400
     1480+D   peData                        *   value
                                             000000    1131500
     1481+D   peDirection                  1A   const
                                             000000    1131600
     1482+D   peOutput                      *
                                             000000    1131700
     1483+
                                              000000    1131800
     1484+
                                              000000    1131900
     1485+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1132000
     1486+ * http_set_100_timeout(): Set value for 100-continue timeouts.
                                             000000    1132100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   29
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1487+ *
                                              000000    1132200
     1488+ * This API lets you change the timeout value that HTTPAPI
   waits                                          000000    1132300
     1489+ * for a "100 Continue" response from the server during a POST
                                              000000    1132400
     1490+ * request. Some servers send this response, others do not. By
                                              000000    1132500
     1491+ * default, HTTPAPI waits 0.5 seconds for a response, and if
   it's                                         000000    1132600
     1492+ * not received, sends the POST.
                                              000000    1132700
     1493+ *
                                              000000    1132800
     1494+ *   Set this to a low value (0.1?) when working with a server
                                              000000    1132900
     1495+ *   that does not send a "100 continue" response. That way,
   you                                          000000    1133000
     1496+ *   don't have to wait for the timeout.
                                              000000    1133100
     1497+ *
                                              000000    1133200
     1498+ *   Set it to a higher value (10.0?) when working with a
   server                                          000000    1133300
     1499+ *   whose responses are slower, but will definitely send the
                                             000000    1133400
     1500+ *   "100".  That way, HTTPAPI won't give up on the response
   and                                          000000    1133500
     1501+ *   get out of sync.
                                             000000    1133600
     1502+ *
                                              000000    1133700
     1503+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1133800
     1504+D http_set_100_timeout...
                                             000000    1133900
     1505+D                 PR
                                              000000    1134000
     1506+D   peTimeout                   10P 3 value
                                             000000    1134100
     1507+
                                              000000    1134200
     1508+
                                              000000    1134300
     1509+ *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                             000000    1134400
     1510+ * HTTP_xml_SetCCSIDs():  Set the CCSIDs used for ASCII/EBCDIC
                                              000000    1134500
     1511+ *                    translation for XML documents
                                             000000    1134600
     1512+ *
                                              000000    1134700
     1513+ *     peRemote = (input) remote CCSID
                                              000000    1134800
     1514+ *     peLocal  = (input) local CCSID (can be 0 if you want
                                             000000    1134900
     1515+ *                 to use the CCSID of the current job)
                                             000000    1135000
     1516+ *
                                              000000    1135100
     1517+ * Returns 0 if successful, -1 otherwise
                                              000000    1135200
     1518+ *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                             000000    1135300
     1519+D HTTP_xml_SetCCSIDs...
                                             000000    1135400
     1520+D                 PR            10I 0
                                             000000    1135500
     1521+D   peRemote                    10I 0 value
                                             000000    1135600
     1522+D   peLocal                     10I 0 value
                                             000000    1135700
     1523+
                                              000000    1135800
     1524+
                                              000000    1135900
     1525+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1136000
     1526+ *  http_parse_xml_stmf(): Parse XML data directly from a
   stream file                                     000000    1136100
     1527+ *                         (instead of downloading it from a
   server)                                      000000    1136200
     1528+ *
                                              000000    1136300
     1529+ *      peFile = (input) Stream file (in IFS) to read data from
                                             000000    1136400
     1530+ *     peCCSID = (input) CCSID of stream file,
                                              000000    1136500
     1531+ *                    or HTTP_XML_CALC to attempt to calculate
   it                                         000000    1136600
     1532+ *                       from the XML encoding
                                              000000    1136700
     1533+ *                    or HTTP_STMF_CALC to use the stream
   file's                                          000000    1136800
     1534+ *                       CCSID attribute.
                                             000000    1136900
     1535+ * peStartProc = (input) call-back procedure to call at the
   start                                         000000    1137000
     1536+ *                       of each XML element received.
                                              000000    1137100
     1537+ *   peEndProc = (input) call-back procedure to call at the end
                                             000000    1137200
     1538+ *                       of each XML element received.
                                              000000    1137300
     1539+ *    peUsrDta = (input) user-defined data that will be passed
                                              000000    1137400
     1540+ *                          to the call-back routine
                                              000000    1137500
     1541+ *
                                              000000    1137600
     1542+ *  Returns  -1 upon failure, 0 if successful
                                             000000    1137700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   30
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1543+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1137800
     1544+D http_parse_xml_stmf...
                                              000000    1137900
     1545+D                 PR            10I 0
                                             000000    1138000
     1546+D  peFile                    32767A   varying const
   options(*varsize)                                     000000
   1138100
     1547+D  peCCSID                      10I 0 value
                                             000000    1138200
     1548+D  peStartProc                    *   value procptr
                                             000000    1138300
     1549+D  peEndProc                      *   value procptr
                                             000000    1138400
     1550+D  peUsrDta                       *   value
                                             000000    1138500
     1551+
                                              000000    1138600
     1552+D HTTP_XML_CALC   C                   -1
                                              000000    1138700
     1553+D HTTP_STMF_CALC  C                   -2
                                              000000    1138800
     1554+
                                              000000    1138900
     1555+
                                              000000    1139000
     1556+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1139100
     1557+ * http_header():  retrieve the value of an HTTP header
                                             000000    1139200
     1558+ *
                                              000000    1139300
     1559+ *      name = (input) name of header to look for
                                             000000    1139400
     1560+ *       pos = (input/optional) position of header if there's
                                             000000    1139500
     1561+ *                 more than one with the same name
                                             000000    1139600
     1562+ *
                                              000000    1139700
     1563+ * returns the value of the HTTP header, or '' if not found
                                             000000    1139800
     1564+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1139900
     1565+D http_header     PR         32500A   varying
                                             000000    1140000
     1566+D   name                       256A   varying const
                                             000000    1140100
     1567+D   pos                         10I 0 value options(*nopass)
                                              000000    1140200
     1568+
                                              000000    1140300
     1569+
                                              000000    1140400
     1570+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1140500
     1571+ * http_use_cookies(): Turns on/off HTTPAPI's cookie parsing
   and                                          000000    1140600
     1572+ *                     caching routines.
                                              000000    1140700
     1573+ *
                                              000000    1140800
     1574+ *    peSetting = (input) *ON = HTTPAPI will read and send
   cookies                                        000000    1140900
     1575+ *                       *OFF = HTTPAPI will ignore cookies
                                             000000    1141000
     1576+ *                              (has no affect on cookies
   supplied                                        000000    1141100
     1577+ *                               via an exit procedure)
                                             000000    1141200
     1578+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1141300
     1579+D http_use_cookies...
                                             000000    1141400
     1580+D                 PR
                                              000000    1141500
     1581+D   peSetting                    1N   const
                                             000000    1141600
     1582+
                                              000000    1141700
     1583+
                                              000000    1141800
     1584+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1141900
     1585+ * http_cookie_file():  Set the name of the file that HTTPAPI
                                             000000    1142000
     1586+ *          will use to store cookies.
                                              000000    1142100
     1587+ *
                                              000000    1142200
     1588+ *    peFilename = (input) Filename (IFS path) to store cookie
                                              000000    1142300
     1589+ *                  data into.
                                              000000    1142400
     1590+ *
                                              000000    1142500
     1591+ *  If the filename is set to '', or if you do not call this
   API,                                         000000    1142600
     1592+ *  cookies will only be saved until the activation group is
                                              000000    1142700
     1593+ *  reclaimed.
                                              000000    1142800
     1594+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1142900
     1595+D http_cookie_file...
                                             000000    1143000
     1596+D                 PR
                                              000000    1143100
     1597+D   peFilename                 256A   varying const
                                             000000    1143200
     1598+
                                              000000    1143300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   31
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1599+
                                              000000    1143400
     1600+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1143500
     1601+ * http_conp(): Send a completion message
                                             000000    1143600
     1602+ *
                                              000000    1143700
     1603+ *      peMessage = message to send.
                                              000000    1143800
     1604+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1143900
     1605+D http_comp       PR
                                              000000    1144000
     1606+D   peMessage                  256A   const
                                             000000    1144100
     1607+
                                              000000    1144200
     1608+
                                              000000    1144300
     1609+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1144400
     1610+ * http_diag(): Send a diagnostic message
                                             000000    1144500
     1611+ *
                                              000000    1144600
     1612+ *      peMessage = message to send.
                                              000000    1144700
     1613+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1144800
     1614+D http_diag       PR
                                              000000    1144900
     1615+D   peMessage                  256A   const
                                             000000    1145000
     1616+
                                              000000    1145100
     1617+
                                              000000    1145200
     1618+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1145300
     1619+ * http_crash(): Send back an *ESCAPE message containing last
                                             000000    1145400
     1620+ *               error found in HTTPAPI.
                                              000000    1145500
     1621+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1145600
     1622+D http_crash      PR
                                              000000    1145700
     1623+
                                              000000    1145800
     1624+
                                              000000    1145900
     1625+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1146000
     1626+ * http_tempfile():  Generate a unique temporary IFS file name
                                              000000    1146100
     1627+ *
                                              000000    1146200
     1628+ * returns the file name
                                              000000    1146300
     1629+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000    1146400
     1630+D http_tempfile   PR            40A   varying
                                             000000    1146500
     1631+
                                              070329    1146600
     1632+
                                              070329    1146700
     1633+
   *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   +                                  070329    1146800
     1634+ * http_xmlns():  Enable XML Namespace processing
                                             070329    1146900
     1635+ *
                                              070329    1147000
     1636+ *     peEnable = (input) *ON to enable parsing, *OFF to
   disable.                                         070329    1147100
     1637+ *                        (it is disabled by default)
                                             070329    1147200
     1638+
   *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   +                                  070329    1147300
     1639+D http_xmlns      PR
                                              070329    1147400
     1640+D   peEnable                     1N   const
                                             070329    1147500
     1641+
                                              070816    1147600
     1642+
                                              070816    1147700
     1643+
   *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   +                                  070816    1147800
     1644+ * http_XmlReturnPtr(): XML End Element Handler should return a
                                             070816    1147900
     1645+ *                      pointer to the full element value
   instead of                                      070816    1148000
     1646+ *                      returning a VARYING character string.
                                             070816    1148100
     1647+ *                      (VARYING is limited to 64k)
                                             070816    1148200
     1648+ *
                                              070816    1148300
     1649+ *     peEnable = (input) *ON to return a pointer, *OFF to
   return                                         070816    1148400
     1650+ *                        a VARYING string (*OFF = default)
                                             070816    1148500
     1651+
   *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   +                                  070816    1148600
     1652+D http_XmlReturnPtr...
                                              070816    1148700
     1653+D                 PR
                                              070816    1148800
     1654+D   peEnable                     1N   const
                                             070816    1148900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   32
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1655+
                                              070912    1149000
     1656+
                                              070912    1149100
     1657+
   *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   +                                  070912    1149200
     1658+ * http_XmlStripCRLF(): Enable stripping of CRLF characters
                                             070912    1149300
     1659+ *
                                              070912    1149400
     1660+ *     peEnable = (input) *ON to strip, *OFF to leave them in.
                                              070912    1149500
     1661+ *                        (they are stripped by default)
                                              070912    1149600
     1662+ *
                                              070912    1149700
     1663+ * Note: To simplify your XML string manipulations, HTTPAPI
                                             070912    1149800
     1664+ *       strips CRLF characters from the response.  If you
   would                                          070912    1149900
     1665+ *       prefer that they are left in the response, call this
                                             070912    1150000
     1666+ *       routine with a parameter of *OFF.
                                              070912    1150100
     1667+
   *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   +                                  070912    1150200
     1668+D http_XmlStripCRLF...
                                              070912    1150300
     1669+D                 PR
                                              070912    1150400
     1670+D   peEnable                     1N   const
                                             070912    1150500
     1671+
                                              071119    1150600
     1672+
                                              071119    1150700
     1673+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     071119    1150800
     1674+ * http_parser_switch_cb(): delegates element processing to
   another                                       071119    1150900
     1675+ *     set of start and end element callback procedures for the
                                             071119    1151000
     1676+ *     current element and its children.
                                              071119    1151100
     1677+ *
                                              071119    1151200
     1678+ *    peUsrDta = (input) user-defined data that will be passed
   to                                         071119    1151300
     1679+ *                       the call-back routine. usuallay only
   that                                        071119    1151400
     1680+ *                       portion of the curent user data is
   forwarded                                     071119    1151500
     1681+ *                       to the new callback procedures that
   they are                                     071119    1151600
     1682+ *                       responsible for.
                                             071119    1151700
     1683+ * peStartProc = (input) call-back procedure to call at the
   start                                         071119    1151800
     1684+ *                       of each XML element received.
                                              071119    1151900
     1685+ *   peEndProc = (input) call-back procedure to call at the end
                                             071119    1152000
     1686+ *                       of each XML element received.
                                              071119    1152100
     1687+ *
                                              071119    1152200
     1688+ *  Returns  -1 upon failure, 0 upon success
                                              071119    1152300
     1689+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     071119    1152400
     1690+D http_parser_switch_cb...
                                              071119    1152500
     1691+D                 PR            10I 0
                                             071119    1152600
     1692+D  peUsrDta                       *   value
                                             071119    1152700
     1693+D  peStartProc                    *   value procptr
                                             071119    1152800
     1694+D  peEndProc                      *   value procptr
   options(*nopass)                                      071119
   1152900
     1695+
                                              080205    1153000
     1696+
                                              080205    1153100
     1697+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     080205    1153200
     1698+ * http_parser_get_start_cb(): returns the procedure pointer of
                                             080205    1153300
     1699+ *     the currently active start callback procedure.
                                             080205    1153400
     1700+ *
                                              080205    1153500
     1701+ *  Returns procedure pointer of start callback procedure.
                                              080205    1153600
     1702+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     080205    1153700
     1703+D http_parser_get_start_cb...
                                             080205    1153800
     1704+D                 PR              *   procptr
                                             080205    1153900
     1705+
                                              080205    1154000
     1706+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     080205    1154100
     1707+ * http_parser_get_end_cb(): returns the procedure pointer of
                                             080205    1154200
     1708+ *     the currently active end callback procedure.
                                             080205    1154300
     1709+ *
                                              080205    1154400
     1710+ *  Returns procedure pointer of end callback procedure.
                                              080205    1154500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   33
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1711+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     080205    1154600
     1712+D http_parser_get_end_cb...
                                             080205    1154700
     1713+D                 PR              *   procptr
                                             080205    1154800
     1714+
                                              080205    1154900
     1715+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     080205    1155000
     1716+ * http_parser_get_userdata(): returns the procedure pointer of
                                             080205    1155100
     1717+ *     the currently active user data.
                                              080205    1155200
     1718+ *
                                              080205    1155300
     1719+ *  Returns procedure pointer of user data.
                                             080205    1155400
     1720+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     080205    1155500
     1721+D http_parser_get_userdata...
                                             080205    1155600
     1722+D                 PR              *
                                             080205    1155700
     1723+
                                              080331    1155800
     1724+
                                              080331    1155900
     1725+
   *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   +                                  080331    1156000
     1726+ * http_parse_xml_string():  Parse XML from an input string.
                                              080331    1156100
     1727+ *                         (instead of downloading it from a
   server)                                      080331    1156200
     1728+ *
                                              080331    1156300
     1729+ *    peString = (input) Pointer to string
                                              080331    1156400
     1730+ *       peLen = (input) Length of string to parse
                                              080331    1156500
     1731+ *     peCCSID = (input) CCSID of string to be parsed
                                             080331    1156600
     1732+ * peStartProc = (input) call-back procedure to call at the
   start                                         080331    1156700
     1733+ *                       of each XML element received.
                                              080331    1156800
     1734+ *   peEndProc = (input) call-back procedure to call at the end
                                             080331    1156900
     1735+ *                       of each XML element received.
                                              080331    1157000
     1736+ *    peUsrDta = (input) user-defined data that will be passed
                                              080331    1157100
     1737+ *                          to the call-back routine
                                              080331    1157200
     1738+ *
                                              080331    1157300
     1739+ *  Returns  -1 upon failure, 0 upon success
                                              080331    1157400
     1740+
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     080331    1157500
     1741+D http_parse_xml_string...
                                              080331    1157600
     1742+D                 PR            10i 0
                                             080331    1157700
     1743+D  peString                       *   value
                                             080331    1157800
     1744+D  peLen                        10I 0 value
                                             080331    1157900
     1745+D  peCCSID                      10I 0 value
                                             080331    1158000
     1746+D  peStartProc                    *   value procptr
                                             080331    1158100
     1747+D  peEndProc                      *   value procptr
                                             080331    1158200
     1748+D  peUsrDta                       *   value
                                             080331    1158300
     1749+
                                              080205    1158400
     1750+
                                              071119    1158500
     1751+
   *********************************************************************
                                      000000    1158600
     1752+ **  Error codes that HTTP API can return
                                             000000    1158700
     1753+
   *********************************************************************
                                      000000    1158800
     1754+ ** Invalid URL format
                                              000000    1158900
     1755+D HTTP_BADURL     C                   CONST(1)
                                              000000    1159000
     1756+ ** Host not found (not a valid IP address, or DNS lookup
   failed)                                         000000    1159100
     1757+D HTTP_HOSTNF     C                   CONST(2)
                                              000000    1159200
     1758+ ** No memory available for a socket addess structure
                                             000000    1159300
     1759+D HTTP_SAALLO     C                   CONST(3)
                                              000000    1159400
     1760+ ** Unable to create a new socket
                                             000000    1159500
     1761+D HTTP_SOCERR     C                   CONST(4)
                                              000000    1159600
     1762+ ** Unable to place the socket in non-blocking mode
                                             000000    1159700
     1763+D HTTP_NONBLK     C                   CONST(5)
                                              000000    1159800
     1764+ ** Error when connecting to server
                                             000000    1159900
     1765+D HTTP_BADCNN     C                   CONST(6)
                                              000000    1160000
     1766+ ** Timeout when connecting to server
                                             000000    1160100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   34
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1767+D HTTP_CNNTIMO    C                   CONST(7)
                                              000000    1160200
     1768+ ** Unable to translate request to ASCII
                                              000000    1160300
     1769+D HTTP_SRXLATE    C                   CONST(8)
                                              000000    1160400
     1770+ ** Error occurred calling select() in the sendreq() procedure
                                              000000    1160500
     1771+D HTTP_SRSELE     C                   CONST(9)
                                              000000    1160600
     1772+ ** Error occurred calling send() in the sendreq() procedure
                                              000000    1160700
     1773+ **   (probably means you were disconnected from the server)
                                              000000    1160800
     1774+D HTTP_SRXMIT     C                   CONST(10)
                                             000000    1160900
     1775+ ** Error occurred calling recv() in the recvresp() procedure
                                             000000    1161000
     1776+ **   (probably means you were disconnected from the server)
                                              000000    1161100
     1777+D HTTP_RRRECV     C                   CONST(11)
                                             000000    1161200
     1778+ ** Error occurred calling select() in the recvresp() procedure
                                             000000    1161300
     1779+D HTTP_RRSELE     C                   CONST(12)
                                             000000    1161400
     1780+ ** HTTP response code logged (not an error, per se)
                                              000000    1161500
     1781+D HTTP_RESP       C                   CONST(13)
                                             000000    1161600
     1782+ ** Error calling recv() in the recvdoc() procedure
                                             000000    1161700
     1783+D HTTP_RDRECV     C                   CONST(14)
                                             000000    1161800
     1784+ ** Error calling select() in the recvdoc() procedure
                                             000000    1161900
     1785+D HTTP_RDSELE     C                   CONST(15)
                                             000000    1162000
     1786+ ** Error calling user-specified procedure in the
                                             000000    1162100
     1787+ **   recvdoc() procedure.  (user proc must return full count)
                                              000000    1162200
     1788+D HTTP_RDWERR     C                   CONST(16)
                                             000000    1162300
     1789+ ** Error occurred while calling send() in the senddoc()
   procedure                                        000000    1162400
     1790+D HTTP_SDSEND     C                   CONST(17)
                                             000000    1162500
     1791+ ** When receiving a 'chunked' document, only a partial chunk
   recvd                                       000000    1162600
     1792+D HTTP_BADCHK     C                   CONST(18)
                                             000000    1162700
     1793+ ** When receiving a 'chunked' document, couldnt read a chunk
   size.                                       000000    1162800
     1794+D HTTP_CHKSIZ     C                   CONST(19)
                                             000000    1162900
     1795+ ** Unsupported transfer-encoding value
                                             000000    1163000
     1796+D HTTP_XFRENC     C                   CONST(20)
                                             000000    1163100
     1797+ ** You dont have access to put a file there :)
                                             000000    1163200
     1798+D HTTP_ACCES      C                   CONST(21)
                                             000000    1163300
     1799+ ** Error opening file to save data into.
                                             000000    1163400
     1800+D HTTP_FDOPEN     C                   CONST(22)
                                             000000    1163500
     1801+ ** Problem with the Application ID for the DCM
                                             000000    1163600
     1802+D HTTP_GSKAPPID   C                   CONST(23)
                                             000000    1163700
     1803+ ** Error setting auth type
                                             000000    1163800
     1804+D HTTP_GSKATYP    C                   CONST(24)
                                             000000    1163900
     1805+ ** Error initializing GSKit environment
                                              000000    1164000
     1806+D HTTP_GSKENVI    C                   CONST(25)
                                             000000    1164100
     1807+ ** Error opening GSKit environment
                                             000000    1164200
     1808+D HTTP_GSKENVO    C                   CONST(26)
                                             000000    1164300
     1809+ ** Error setting session type (client | server | server_auth)
                                              000000    1164400
     1810+D HTTP_GSKSTYP    C                   CONST(27)
                                             000000    1164500
     1811+ ** Error registering application w/DCM
                                             000000    1164600
     1812+D HTTP_REGERR     C                   CONST(28)
                                             000000    1164700
     1813+ ** Error open secure socket
                                              000000    1164800
     1814+D HTTP_SSOPEN     C                   CONST(29)
                                             000000    1164900
     1815+ ** Error setting SSL numeric file descriptor
                                             000000    1165000
     1816+D HTTP_SSSNFD     C                   CONST(30)
                                             000000    1165100
     1817+ ** Error setting SSL numeric timeout value
                                             000000    1165200
     1818+D HTTP_SSSNTO     C                   CONST(31)
                                             000000    1165300
     1819+ ** SSL handshake timed out
                                             000000    1165400
     1820+D HTTP_SSTIMO     C                   CONST(32)
                                             000000    1165500
     1821+ ** Select() failure in SendDoc()
                                             000000    1165600
     1822+D HTTP_SDSELE     C                   CONST(33)
                                             000000    1165700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   35
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1823+ ** Select() failure in get_chunk_size()
                                              000000    1165800
     1824+D HTTP_CSSELE     C                   CONST(34)
                                             000000    1165900
     1825+ ** This app is not registered with digital cert mgr
                                              000000    1166000
     1826+D HTTP_NOTREG     C                   CONST(35)
                                             000000    1166100
     1827+ ** This URI needs authorization (user/pass)
                                              000000    1166200
     1828+D HTTP_NDAUTH     C                   CONST(36)
                                             000000    1166300
     1829+ ** Invalid HTTP authentication type
                                              000000    1166400
     1830+D HTTP_ATHTYP     C                   CONST(37)
                                             000000    1166500
     1831+ ** Error in value of an HTTP authentication string
                                             000000    1166600
     1832+D HTTP_ATHVAL     C                   CONST(38)
                                             000000    1166700
     1833+ ** Server didn't ask for authorizatin
                                              000000    1166800
     1834+D HTTP_NOAUTH     C                   CONST(39)
                                             000000    1166900
     1835+ ** HTTP server didn't send a "100 Continue" in response
                                              000000    1167000
     1836+ ** to our POST request.
                                              000000    1167100
     1837+D HTTP_PST417     C                   CONST(40)
                                             000000    1167200
     1838+ ** recvresp() timed out waiting for a server response code
                                             000000    1167300
     1839+D HTTP_RRTIME     C                   CONST(41)
                                             000000    1167400
     1840+ ** recvdoc() timed out waiting for more data
                                             000000    1167500
     1841+D HTTP_RDTIME     C                   CONST(42)
                                             000000    1167600
     1842+ ** blockread() timed out waiting for more data
                                             000000    1167700
     1843+D HTTP_BRTIME     C                   CONST(43)
                                             000000    1167800
     1844+ ** blockread() error during recv() call
                                              000000    1167900
     1845+D HTTP_BRRECV     C                   CONST(44)
                                             000000    1168000
     1846+ ** blockread() error during select() call
                                              000000    1168100
     1847+D HTTP_BRSELE     C                   CONST(45)
                                             000000    1168200
     1848+ ** recvchunk() did not get the trailing CRLF chars
                                             000000    1168300
     1849+D HTTP_RDCRLF     C                   CONST(46)
                                             000000    1168400
     1850+ ** Invalid exit point registered with HTTP_Xproc()
                                             000000    1168500
     1851+D HTTP_BADPNT     C                   CONST(47)
                                             000000    1168600
     1852+ ** Error retrieving SSL protocol
                                             000000    1168700
     1853+D HTTP_SSPROT     C                   CONST(48)
                                             000000    1168800
     1854+ ** Unknown SSL protocol
                                              000000    1168900
     1855+D HTTP_SSPUNK     C                   CONST(49)
                                             000000    1169000
     1856+ ** Error setting SSL protocol
                                              000000    1169100
     1857+D HTTP_SSPSET     C                   CONST(50)
                                             000000    1169200
     1858+ ** Out of memory
                                             000000    1169300
     1859+D HTTP_NOMEM      C                   CONST(51)
                                             000000    1169400
     1860+ ** Must give data in order to encode it
                                              000000    1169500
     1861+D HTTP_NODATA     C                   CONST(52)
                                             000000    1169600
     1862+ ** Pointer is invalid or already freed
                                             000000    1169700
     1863+D HTTP_INVPTR     C                   CONST(53)
                                             000000    1169800
     1864+ ** Not enough space to add encoded variable
                                              000000    1169900
     1865+D HTTP_NOSPAC     C                   CONST(54)
                                             000000    1170000
     1866+ ** Error calling send() API in BlockWrite()
                                              000000    1170100
     1867+D HTTP_BWSEND     C                   CONST(55)
                                             000000    1170200
     1868+ ** Error calling select() API in BlockWrite()
                                              000000    1170300
     1869+D HTTP_BWSELE     C                   CONST(56)
                                             000000    1170400
     1870+ ** Timeout waiting to send in BlockWrite()
                                             000000    1170500
     1871+D HTTP_BWTIME     C                   CONST(57)
                                             000000    1170600
     1872+ ** Lineread() had problem with recv() API
                                              000000    1170700
     1873+D HTTP_LRRECV     C                   CONST(58)
                                             000000    1170800
     1874+ ** Lineread() had problem with select() API
                                              000000    1170900
     1875+D HTTP_LRSELE     C                   CONST(59)
                                             000000    1171000
     1876+ ** Lineread() had timeout
                                              000000    1171100
     1877+D HTTP_LRTIME     C                   CONST(60)
                                             000000    1171200
     1878+ ** Procedure is no longer supported
                                              000000    1171300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   36
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1879+D HTTP_NOTSUPP    C                   CONST(61)
                                             000000    1171400
     1880+ ** No communication driver defined
                                             000000    1171500
     1881+D HTTP_NOCDRIV    C                   CONST(62)
                                             000000    1171600
     1882+ ** Timeout sending data in blockwrite
                                              000000    1171700
     1883+D HTTP_BWTIMO     C                   CONST(63)
                                             000000    1171800
     1884+ ** Timeout sending data in blockwrite
                                              000000    1171900
     1885+D HTTP_SWCERR     C                   CONST(64)
                                             000000    1172000
     1886+ ** Timeout sending data in blockwrite
                                              000000    1172100
     1887+D HTTP_FDSTAT     C                   CONST(65)
                                             000000    1172200
     1888+ ** Error parsing XML data
                                              000000    1172300
     1889+D HTTP_XMLERR     C                   CONST(66)
                                             000000    1172400
     1890+ ** Error opening IFS file
                                              000000    1172500
     1891+D HTTP_IFOPEN     C                   CONST(67)
                                             000000    1172600
     1892+ ** Error with SSL keyring
                                              000000    1172700
     1893+D HTTP_GSKKEYF    C                   CONST(68)
                                             000000    1172800
     1894+ ** Must Use Table / Must not Use Table
                                             000000    1172900
     1895+D HTTP_MUTABLE    C                   CONST(69)
                                             000000    1173000
     1896+ ** Cookie file cant be written
                                             000000    1173100
     1897+D HTTP_CKDUMP     C                   CONST(70)
                                             000000    1173200
     1898+ ** Cookie file cant be read
                                              000000    1173300
     1899+D HTTP_CKOPEN     C                   CONST(71)
                                             000000    1173400
     1900+ ** Can't get stats on cookie file
                                              000000    1173500
     1901+D HTTP_CKSTAT     C                   CONST(72)
                                             000000    1173600
     1902+ ** Error converting CCSIDs
                                             000000    1173700
     1903+D HTTP_CONVERR    C                   CONST(73)
                                             000000    1173800
     1904+ ** Error setting stream file CCSID
                                             000000    1173900
     1905+D HTTP_SETATTR    C                   CONST(74)
                                             000000    1174000
     1906+ ** This Proxy server needs authorization (user/pass)
                                             000000    1174100
     1907+D HTTP_PXNDAUTH   C                   CONST(75)
                                             000000    1174200
     1908+ ** XML callback switched illegally
                                             071119    1174300
     1909+D HTTP_ILLSWC     C                   CONST(76)
                                             071119    1174400
     1910+ ** Error getting certificate info
                                              071218    1174500
     1911+D HTTP_SSLGCI     C                   CONST(77)
                                             071218    1174600
     1912+ ** Error from certificate validation callback
                                              071218    1174700
     1913+D HTTP_SSLVAL     C                   CONST(78)
                                             071218    1174800
     1914+
                                              000000    1174900
     1915+
                                              000000    1175000
     1916+
   *********************************************************************
                                      000000    1175100
     1917+ *  HTTP WWW-Authentication types
                                             000000    1175200
     1918+
   *********************************************************************
                                      000000    1175300
     1919+D HTTP_AUTH_NONE...
                                             000000    1175400
     1920+D                 C                   '0'
                                             000000    1175500
     1921+D HTTP_AUTH_BASIC...
                                              000000    1175600
     1922+D                 C                   '1'
                                             000000    1175700
     1923+D HTTP_AUTH_MD5_DIGEST...
                                             000000    1175800
     1924+D                 C                   '2'
                                             000000    1175900
     1925+
                                              000000    1176000
     1926+
                                              000000    1176100
     1927+
   *********************************************************************
                                      000000    1176200
     1928+ *  HTTPAPI Exit points
                                             000000    1176300
     1929+
   *********************************************************************
                                      000000    1176400
     1930+ ** Debug exit point:  This is called when ASCII stream data is
   to be                                     000000    1176500
     1931+ **                    to a log file.   Here's the prototype
   for a                                        000000    1176600
     1932+ **                    debug exit procedure:
                                              000000    1176700
     1933+ **
                                             000000    1176800
     1934+ **  D debug_proto     PR
                                             000000    1176900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   37
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1935+ **  D   DataToLog                     *   value
                                              000000    1177000
     1936+ **  D   Length                      10I 0 value
                                              000000    1177100
     1937+ **
                                             000000    1177200
     1938+D HTTP_POINT_DEBUG...
                                             000000    1177300
     1939+D                 C                   1
                                             000000    1177400
     1940+
                                              000000    1177500
     1941+ ** Upload status exit point:  This is called periodically
   during an                                      000000    1177600
     1942+ **                            upload (POST) to an HTTP(S)
   server.                                        000000    1177700
     1943+ **                            Allows you to display progress
   to the                                      000000    1177800
     1944+ **                            user.
                                              000000    1177900
     1945+ **
                                             000000    1178000
     1946+ **  D upload_proto    PR
                                             000000    1178100
     1947+ **  D   BytesSent                   10U 0 value
                                              000000    1178200
     1948+ **  D   BytesTotal                  10U 0 value
                                              000000    1178300
     1949+ **
                                             000000    1178400
     1950+D HTTP_POINT_UPLOAD_STATUS...
                                             000000    1178500
     1951+D                 C                   2
                                             000000    1178600
     1952+
                                              000000    1178700
     1953+ ** Download status exit point:  This is called periodically
   during a                                     000000    1178800
     1954+ **                              download (POST or GET) from an
   HTTP(S)                                   000000    1178900
     1955+ **                              server.  Allows you to display
   the                                       000000    1179000
     1956+ **                              progress to the user.
                                              000000    1179100
     1957+ **
                                             000000    1179200
     1958+ **  D download_proto  PR
                                             000000    1179300
     1959+ **  D   BytesRecv                   10U 0 value
                                              000000    1179400
     1960+ **  D   BytesTotal                  10U 0 value
                                              000000    1179500
     1961+ **
                                             000000    1179600
     1962+D HTTP_POINT_DOWNLOAD_STATUS...
                                             000000    1179700
     1963+D                 C                   3
                                             000000    1179800
     1964+
                                              000000    1179900
     1965+ ** Additional Header fields exit point:
                                              000000    1180000
     1966+ **    Allows you to supply additional header data to be added
                                              000000    1180100
     1967+ **    to the HTTP request chain.  Data should be in EBCDIC
   with                                          000000    1180200
     1968+ **    x'0d25' after each header record.
                                              000000    1180300
     1969+ **
                                             000000    1180400
     1970+ **  D addl_hdrs_prot  PR
                                             000000    1180500
     1971+ **  D   HeaderData                1024A   varying
                                              000000    1180600
     1972+ **
                                             000000    1180700
     1973+D HTTP_POINT_ADDL_HEADER...
                                             000000    1180800
     1974+D                 C                   4
                                             000000    1180900
     1975+
                                              000000    1181000
     1976+ ** Header parse exit point:
                                              000000    1181100
     1977+ **    Allows you to examine the HTTP response chain received
                                             000000    1181200
     1978+ **    from the HTTP server.
                                              000000    1181300
     1979+ **
                                             000000    1181400
     1980+ **  D parse_hdr_prot  PR
                                             000000    1181500
     1981+ **  D   HeaderData                2048A   const
                                              000000    1181600
     1982+ **
                                             000000    1181700
     1983+D HTTP_POINT_PARSE_HEADER...
                                              000000    1181800
     1984+D                 C                   5
                                             000000    1181900
     1985+
                                              000000    1182000
     1986+ ** Header parse exit point:
                                              000000    1182100
     1987+ **    Allows you to examine the HTTP response chain received
                                             000000    1182200
     1988+ **    from the HTTP server. (allows longer headers)
                                              000000    1182300
     1989+ **
                                             000000    1182400
     1990+ **  D parse_hdr_long  PR
                                             000000    1182500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   38
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     1991+ **  D   HeaderData               32767A   const varying
                                              000000    1182600
     1992+ **
                                             000000    1182700
     1993+D HTTP_POINT_PARSE_HDR_LONG...
                                              000000    1182800
     1994+D                 C                   6
                                             000000    1182900
     1995+
                                              071218    1183000
     1996+ ** SSL Certificate validation:
                                             071218    1183100
     1997+ **    This will be called repeatedly for each field in each
                                              071218    1183200
     1998+ **    certificate when parsed by HTTPAPI.
                                              071218    1183300
     1999+ **
                                             071218    1183400
     2000+ **  D cert_valid      PR            10i 0
                                              071218    1183500
     2001+ **  D   usrdta                        *   value
                                              071218    1183600
     2002+ **  D   id                                like(CERT_DATA_ID)
   value                                       071218    1183700
     2003+ **  D   data                     32767a   varying const
                                              071218    1183800
     2004+ **  D   errmsg                      80a
                                              071218    1183900
     2005+ **
                                             071218    1184000
     2006+ **     id = certificate data id (see CERT_DATA_ID_T in
   GSKSSL_H)                                         071218    1184100
     2007+ **   data = certificate element data.  (For binary elements,
   this                                        071221    1184200
     2008+ **          is binary data. For others, it'll be EBCDIC data.)
                                             071218    1184300
     2009+ ** errmsg = the callback can use this to return a reason why a
                                             071218    1184400
     2010+ **          certificate wasn't valid.  (retrievable
   w/HTTP_error)                                        071218    1184500
     2011+ **
                                             071218    1184600
     2012+ **  Return 0 if okay, -1 if you want to reject it.
                                             071218    1184700
     2013+ **
                                             071218    1184800
     2014+D HTTP_POINT_CERT_VAL...
                                              071218    1184900
     2015+D                 C                   7
                                             071218    1185000
     2016+
                                              071218    1185100
     2017+ ** SSL Certificate validation (GSkit)
                                              071221    1185200
     2018+ **    This sets the GSK_CERT_VALIDATION_CALLBACK callback proc
                                             071218    1185300
     2019+ **    within GSKit.  The GSKit (not HTTPAPI) will call back
                                              071218    1185400
     2020+ **    your procedure to validate a certificate.
                                              071218    1185500
     2021+ **
                                             071218    1185600
     2022+ **    See the gsk_attribute_set_callback() API documentation
                                             071218    1185700
     2023+ **    in the IBM Information Center for details.
                                             071218    1185800
     2024+ **
                                             071218    1185900
     2025+ **    Note: The UserData parameter to http_xproc() will be
                                             071218    1186000
     2026+ **          passed as the 3rd parameter to the
                                             071218    1186100
     2027+ **          gsk_attribute_set_callback() API -- the peProc
                                             071218    1186200
     2028+ **          parameter to http_xproc() is ignored for this
                                              071218    1186300
     2029+ **          exit point.
                                              071218    1186400
     2030+ **
                                             071218    1186500
     2031+D HTTP_POINT_GSKIT_CERT_VAL...
                                              071218    1186600
     2032+D                 C                   8
                                             071218    1186700
     2033+
                                              000000    1186800
     2034+
                                              000000    1186900
     2035+
   *********************************************************************
                                      000000    1187000
     2036+ * Directions for HTTP_xlate() and HTTP_xlatep()
                                              000000    1187100
     2037+
   *********************************************************************
                                      000000    1187200
     2038+D TO_ASCII        C                   '1'
                                             000000    1187300
     2039+D TO_EBCDIC       C                   '2'
                                             000000    1187400
     2040  /copy QRPGLESRC,PRIVATE_H
                                              000000     006500

   *---------------------------------------------------------------------
   -----------------------*
           * Nombre de miembro RPG  . . :  PRIVATE_H
                                  *                     3
           * Nombre externo . . . . . . :  LIBHTTP/QRPGLESRC(PRIVATE_H)
                                 *                     3
           * Ultimo cambio  . . . . . . :  18/12/07  16:04:53
                                 *                     3
           * Texto descriptivo  . . . . :  Global/Private HTTPAPI
   definitions                           *                     3

   *---------------------------------------------------------------------
   -----------------------*
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   39
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2041+ /if defined(PRIVATE_H)
                                             040727    3000100
               LINES EXCLUDED: 1
     2042+ /endif
                                             040727    3000300
     2043+ /define PRIVATE_H
                                              040727    3000400
     2044+
                                              040727    3000500
     2045+D base64_init     PR
                                              040727    3000600
     2046+D   peBase64                      *   value
                                             040727    3000700
     2047+
                                              040727    3000800
     2048+D base64_encode   PR            10I 0
                                             040727    3000900
     2049+D   peInput                       *   value
                                             040727    3001000
     2050+D   peInputLen                  10I 0 value
                                             040727    3001100
     2051+D   peOutput                      *   value
                                             040727    3001200
     2052+D   peOutSize                   10I 0 value
                                             040727    3001300
     2053+
                                              040727    3001400
     2054+D url_encode_pre  PR            10I 0
                                             040727    3001500
     2055+D    peEncoder                    *   value
                                             040727    3001600
     2056+D    peInput                      *   value
                                             040727    3001700
     2057+D    peInpLen                   10I 0 value
                                             040727    3001800
     2058+
                                              040727    3001900
     2059+D url_encode      PR
                                              040727    3002000
     2060+D    peEncoder                    *   value
                                             040727    3002100
     2061+D    peInput                      *   value
                                             040727    3002200
     2062+D    peInpLen                   10I 0 value
                                             040727    3002300
     2063+D    peLoc                        *   value
                                             040727    3002400
     2064+D    peLocSize                  10I 0 value
                                             040727    3002500
     2065+
                                              040727    3002600
     2066+D debug_setproc   PR
                                              040727    3002700
     2067+D   peProc                        *   procptr value
                                             040727    3002800
     2068+D   peUserData                    *   value
                                             050822    3002900
     2069+
                                              040727    3003000
     2070+D debug_write     PR
                                              040727    3003100
     2071+D   peData                        *   value
                                             040727    3003200
     2072+D   peLen                       10I 0 value
                                             040727    3003300
     2073+
                                              040727    3003400
     2074+D debug_msg       PR
                                              040727    3003500
     2075+D   peMsgTxt                   256A   const
                                             040727    3003600
     2076+
                                              040727    3003700
     2077+D debug_close     PR
                                              040727    3003800
     2078+
                                              040727    3003900
     2079+D md5             PR             1N
                                             040727    3004000
     2080+D   peData                        *   value
                                             040727    3004100
     2081+D   peDataLen                   10I 0 value
                                             040727    3004200
     2082+D   peDigest                    32A
                                             040727    3004300
     2083+
                                              040727    3004400
     2084+D util_Diag       PR             1N
                                             040727    3004500
     2085+D   peMsgTxt                   256A   const
                                             040727    3004600
     2086+
                                              040727    3004700
     2087+d SetError        PR
                                              040727    3004800
     2088+d   peErrorNo                   10I 0 value
                                             040727    3004900
     2089+d   peErrorMsg                  80A   const
                                             040727    3005000
     2090+
                                              040727    3005100
     2091+d httpdate        PR            29A
                                             040727    3005200
     2092+d  peTS                           Z   const
                                             040727    3005300
     2093+
                                              050623    3005400
     2094+D FILE_CCSID      PR            10I 0
                                             050623    3005500
     2095+
                                              051229    3005600
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   40
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2096+D xml_xlate       PR            10I 0
                                             060923    3005700
     2097+D   peSize                      10I 0 value
                                             060923    3005800
     2098+D   peData                        *   value
                                             060923    3005900
     2099+D   peOutBuf                      *
                                             060923    3006000
     2100+
                                              050630    3006100
     2101+ ** utilities from COMMTCPR4 are that used by COMMSSLR4
                                             050630    3006200
     2102+
                                              050630    3006300
     2103+D CommTcp_ConnectBlocking...
                                              050630    3006400
     2104+D                 PR            10I 0
                                             050630    3006500
     2105+D   peSockaddr                    *   value
                                             050630    3006600
     2106+D   peTimeout                   10P 3 value
                                             050630    3006700
     2107+
                                              050630    3006800
     2108+D CommTcp_ConnectNonBlock...
                                              050630    3006900
     2109+D                 PR            10I 0
                                             050630    3007000
     2110+D   peSockaddr                    *   value
                                             050630    3007100
     2111+D   peTimeout                   10P 3 value
                                             050630    3007200
     2112+
                                              061002    3007300
     2113+D CommTcp_FD_Set...
                                             061002    3007400
     2114+D                 PR
                                              061002    3007500
     2115+D   peFD                        10I 0
                                             061002    3007600
     2116+D   peFDSet                     28A
                                             061002    3007700
     2117+
                                              061002    3007800
     2118+D CommTcp_FD_IsSet...
                                             061002    3007900
     2119+D                 PR             1N
                                             061002    3008000
     2120+D   peFD                        10I 0
                                             061002    3008100
     2121+D   peFDSet                     28A
                                             061002    3008200
     2122+
                                              061002    3008300
     2123+D CommTcp_FD_Zero...
                                              061002    3008400
     2124+D                 PR
                                              061002    3008500
     2125+D   peFDSet                     28A
                                             061002    3008600
     2126+
                                              061002    3008700
     2127+D fdset           s             28A   based(template)
                                             061002    3008800
     2128+
                                              040820    3008900
     2129+ ***  IBM-supplied functions  ***
                                             040820    3009000
     2130+
                                              040820    3009100
     2131+D atoi            PR            10I 0 ExtProc('atoi')
                                             040820    3009200
     2132+D  string                         *   value options(*string)
                                              040820    3009300
     2133+ /if defined(HAVE_INT64)
                                              040820    3009400
     2134+D atoll           PR            20I 0 ExtProc('atoll')
                                              040820    3009500
     2135+D  string                         *   value options(*string)
                                              040820    3009600
     2136+ /else
                                              040820    3009700
               LINES EXCLUDED: 2
     2137+ /endif
                                             040820    3010000
     2138+
                                              060922    3010100
     2139+D memcpy          PR              *   ExtProc('memcpy')
                                             060922    3010200
     2140+D   dst                           *   value
                                             060922    3010300
     2141+D   src                           *   value
                                             060922    3010400
     2142+D   length                      10U 0 value
                                             060922    3010500
     2143+
                                              070125    3010600
     2144+ /if defined(USE_TS_MALLOC64)
                                             070828    3010700
               LINES EXCLUDED: 2
     2145+ /else
                                              070125    3011000
     2146+D TS_malloc       PR              *   ExtProc('_C_TS_malloc')
                                             070125    3011100
     2147+D   size                        10U 0 value
                                             070125    3011200
     2148+ /endif
                                             070125    3011300
     2149+D TS_realloc      PR              *   ExtProc('_C_TS_realloc')
                                              070125    3011400
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   41
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2150+D   ptr                           *   value
                                             070125    3011500
     2151+D   size                        10U 0 value
                                             070125    3011600
     2152+D TS_free         PR                  ExtProc('_C_TS_free')
                                             070125    3011700
     2153+D   ptr                           *   value
                                             070125    3011800
     2154+
                                              070125    3011900
     2155+D xalloc          PR              *
                                             070125    3012000
     2156+D   size                        20p 0 value
                                             070125    3012100
     2157+D xdealloc        PR
                                              070125    3012200
     2158+D   ptr                           *
                                             070125    3012300
     2159+D xrealloc        PR              *
                                             070125    3012400
     2160+D   ptr                           *   value
                                             070125    3012500
     2161+D   size                        20p 0 value
                                             070125    3012600
     2162+
                                              070816    3012700
     2163+D new_iconv       PR            52a
                                             070816    3012800
     2164+D   peFrom                      10i 0 value
                                             070816    3012900
     2165+D   peTo                        10i 0 value
                                             070816    3013000
     2166+
                                              070816    3013100
     2167+D close_iconv     PR
                                              070816    3013200
     2168+D   This                        52a   value
                                             070816    3013300
     2169+
                                              070816    3013400
     2170+D iconvdyn        PR            10I 0
                                             070816    3013500
     2171+D   peSize                      10I 0 value
                                             070816    3013600
     2172+D   peData                        *   value
                                             070816    3013700
     2173+D   peDesc                      52a
                                             070816    3013800
     2174+D   peOutbuf                      *
                                             070816    3013900
     2175+
                                              070907    3014000
     2176+D get_symbols     PR            25a
                                             070907    3014100
     2177+
                                              071121    3014200
     2178+D OS_Release      PR             6a
                                             071121    3014300
     2179+
                                              071218    3014400
     2180+ /if defined(HAVE_SSLAPI)
                                             071218    3014500
     2181+D commssl_setxproc...
                                             071218    3014600
     2182+D                 PR
                                              071218    3014700
     2183+D    pePoint                    10I 0 value
                                             071218    3014800
     2184+D    peProc                       *   procptr value
                                             071218    3014900
     2185+D    peUsrDta                     *   value
                                             071218    3015000
     2186+ /endif
                                             071218    3015100
     2187  /copy QRPGLESRC,HEADER_H
                                             000000     006600

   *---------------------------------------------------------------------
   -----------------------*
           * Nombre de miembro RPG  . . :  HEADER_H
                                 *                     4
           * Nombre externo . . . . . . :  LIBHTTP/QRPGLESRC(HEADER_H)
                                  *                     4
           * Ultimo cambio  . . . . . . :  12/01/06  11:54:43
                                 *                     4
           * Texto descriptivo  . . . . :  Routines for working with
   Headers & Cookies                  *                     4

   *---------------------------------------------------------------------
   -----------------------*
     2188+D header_parse    PR
                                              060112    4000100
     2189+D   resp                     32767A   varying const
                                             060112    4000200
     2190+D   userdata                      *   value
                                             060112    4000300
     2191+
                                              060112    4000400
     2192+D header_load_cookies...
                                              060112    4000500
     2193+D                 PR
                                              060112    4000600
     2194+D   req_domain                 256A   varying const
                                             060112    4000700
     2195+D   req_path                   256A   varying const
                                             060112    4000800
     2196+
                                              060112    4000900
     2197+D header_get_req_cookies...
                                             060112    4001000
     2198+D                 PR         32767A   varying
                                             060112    4001100
     2199+D   host                       256A   varying const
                                             060112    4001200
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   42
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2200+D   path                     32767A   varying const
                                             060112    4001300
     2201+D   Secure                       1N   const
                                             060112    4001400
     2202  /copy QRPGLESRC,ERRNO_H
                                              000000     006700

   *---------------------------------------------------------------------
   -----------------------*
           * Nombre de miembro RPG  . . :  ERRNO_H
                                  *                     5
           * Nombre externo . . . . . . :  LIBHTTP/QRPGLESRC(ERRNO_H)
                                 *                     5
           * Ultimo cambio  . . . . . . :  05/02/08  15:29:41
                                 *                     5
           * Texto descriptivo  . . . . :  Header for Error Handling in
   C/UNIX APIs                     *                     5

   *---------------------------------------------------------------------
   -----------------------*
     2203+/*-
                  +                          010715    5000100
     2204+ * Copyright (c) 2001-2008 Scott C. Klement
                  +                          080205    5000200
     2205+ * All rights reserved.
                  +                          010715    5000300
     2206+ *
                   +                          010715    5000400
     2207+ * Redistribution and use in source and binary forms, with or
   without          +                          010715    5000500
     2208+ * modification, are permitted provided that the following
   conditions          +                          010715    5000600
     2209+ * are met:
                  +                          010715    5000700
     2210+ * 1. Redistributions of source code must retain the above
   copyright           +                          010715    5000800
     2211+ *    notice, this list of conditions and the following
   disclaimer.            +                          010715    5000900
     2212+ * 2. Redistributions in binary form must reproduce the above
   copyright        +                          010715    5001000
     2213+ *    notice, this list of conditions and the following
   disclaimer in the      +                          010715    5001100
     2214+ *    documentation and/or other materials provided with the
   distribution.     +                          010715    5001200
     2215+ *
                   +                          010715    5001300
     2216+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS
   ''AS IS'' AND      +                          070828    5001400
     2217+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   LIMITED TO, THE       +                          010715    5001500
     2218+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
   PARTICULAR PURPOSE  +                          010715    5001600
     2219+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR
   CONTRIBUTORS BE LIABLE     +                          010715
   5001700
     2220+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   CONSEQUENTIAL  +                          010715    5001800
     2221+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   SUBSTITUTE GOODS     +                          010715    5001900
     2222+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   INTERRUPTION)       +                          010715    5002000
     2223+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   CONTRACT, STRICT  +                          010715    5002100
     2224+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   ARISING IN ANY WAY   +                          010715    5002200
     2225+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   POSSIBILITY OF      +                          010715    5002300
     2226+ * SUCH DAMAGE.
                  +                          010715    5002400
     2227+ *
                   +                          010715    5002500
     2228+ */
                  +                          010715    5002600
     2229+
                                              010715    5002700
     2230+
                                              010715    5002800
     2231+ ** ERRNO_H --  Header file for working with C-Runtime and
                                              010425    5002900
     2232+ **     UNIX-Type API error handling routines.
                                              010425    5003000
     2233+ **                                               SCK 04/25/01
                                              010425    5003100
     2234+ **
                                             010425    5003200
     2235+ **  To use this:
                                             010425    5003300
     2236+ **       1)  put a /COPY ERRNO_H in the D-specs of your
   program.                                         010425    5003400
     2237+ **       2)  put a "/define ERRNO_LOAD_PROCEDURE", followed by
   a                                         010425    5003500
     2238+ **               2nd "/COPY ERRNO_H" somewhere that procedures
                                             010425    5003600
     2239+ **               are allowed to be defined :)
                                              010425    5003700
     2240+ **       3)  bind to the QC2LE binding directory.
                                              010425    5003800
     2241+ **
                                             010425    5003900
     2242+ **
                                             010425    5004000
     2243+ /if not defined(ERRNO_LOAD_PROCEDURE)
                                              010425    5004100
     2244+
                                              010715    5004200
     2245+
   *-------------------------------------------------------------------
                                     010715    5004300
     2246+ * error constant definitions
                                             010715    5004400
     2247+
   *-------------------------------------------------------------------
                                     010715    5004500
     2248+
                                              010715    5004600
     2249+ * these values come originally from file QCLE/H member ERRNO
                                             010715    5004700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   43
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2250+
                                              010715    5004800
     2251+ * domain error in math function
                                              010715    5004900
     2252+D EDOM            C                   3001
                                              010715    5005000
     2253+ * range error in math function
                                             010715    5005100
     2254+D ERANGE          C                   3002
                                              010715    5005200
     2255+ * truncation on I/O operation
                                              010715    5005300
     2256+D ETRUNC          C                   3003
                                              010715    5005400
     2257+ * file has not been opened
                                             010715    5005500
     2258+D ENOTOPEN        C                   3004
                                              010715    5005600
     2259+ * file not opened for read
                                             010715    5005700
     2260+D ENOTREAD        C                   3005
                                              010715    5005800
     2261+ * file opened for record I/O
                                             010715    5005900
     2262+D ERECIO          C                   3008
                                              010715    5006000
     2263+ * file not opened for write
                                              010715    5006100
     2264+D ENOTWRITE       C                   3009
                                              010715    5006200
     2265+ * stdin cannot be opened
                                             010715    5006300
     2266+D ESTDIN          C                   3010
                                              010715    5006400
     2267+ * stdout cannot be opened
                                              010715    5006500
     2268+D ESTDOUT         C                   3011
                                              010715    5006600
     2269+ * stderr cannot be opened
                                              010715    5006700
     2270+D ESTDERR         C                   3012
                                              010715    5006800
     2271+ * bad offset to seek to
                                              010715    5006900
     2272+D EBADSEEK        C                   3013
                                              010715    5007000
     2273+ * invalid file name specified
                                              010715    5007100
     2274+D EBADNAME        C                   3014
                                              010715    5007200
     2275+ * invalid file mode specified
                                              010715    5007300
     2276+D EBADMODE        C                   3015
                                              010715    5007400
     2277+ * invalid position specifier
                                             010715    5007500
     2278+D EBADPOS         C                   3017
                                              010715    5007600
     2279+ * no record at specified position
                                              010715    5007700
     2280+D ENOPOS          C                   3018
                                              010715    5007800
     2281+ * no ftell if more than 1 member
                                             010715    5007900
     2282+D ENUMMBRS        C                   3019
                                              010715    5008000
     2283+ * no ftell if too many records
                                             010715    5008100
     2284+D ENUMRECS        C                   3020
                                              010715    5008200
     2285+ * invalid function pointer
                                             010715    5008300
     2286+D EBADFUNC        C                   3022
                                              010715    5008400
     2287+ * record not found
                                             010715    5008500
     2288+D ENOREC          C                   3026
                                              010715    5008600
     2289+ * message data invalid
                                             010715    5008700
     2290+D EBADDATA        C                   3028
                                              010715    5008800
     2291+ * bad option on I/O function
                                             010715    5008900
     2292+D EBADOPT         C                   3040
                                              010715    5009000
     2293+ * file not opened for update
                                             010715    5009100
     2294+D ENOTUPD         C                   3041
                                              010715    5009200
     2295+ * file not opened for delete
                                             010715    5009300
     2296+D ENOTDLT         C                   3042
                                              010715    5009400
     2297+ * padding occurred on write operation
                                              010715    5009500
     2298+D EPAD            C                   3043
                                              010715    5009600
     2299+ * bad key length option
                                              010715    5009700
     2300+D EBADKEYLN       C                   3044
                                              010715    5009800
     2301+ * illegal write after read
                                             010715    5009900
     2302+D EPUTANDGET      C                   3080
                                              010715    5010000
     2303+ * illegal read after write
                                             010715    5010100
     2304+D EGETANDPUT      C                   3081
                                              010715    5010200
     2305+ * I/O exception non-recoverable error
                                              010715    5010300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   44
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2306+D EIOERROR        C                   3101
                                              010715    5010400
     2307+ * I/O exception recoverable error
                                              010715    5010500
     2308+D EIORECERR       C                   3102
                                              010715    5010600
     2309+
                                              010715    5010700
     2310+ * The following were taken from QSYSINC/SYS ERRNO:
                                             010715    5010800
     2311+
                                              010715    5010900
     2312+ *  Permission denied.
                                              010425    5011000
     2313+D EACCES          C                   3401
                                              000000    5011100
     2314+ *  Not a directory.
                                              010425    5011200
     2315+D ENOTDIR         C                   3403
                                              000000    5011300
     2316+ *  No space available.
                                             010425    5011400
     2317+D ENOSPC          C                   3404
                                              000000    5011500
     2318+ *  Improper link.
                                              010425    5011600
     2319+D EXDEV           C                   3405
                                              000000    5011700
     2320+ *  Operation would have caused the process
                                             010425    5011800
     2321+D EWOULDBLOCK     C                   3406
                                              000000    5011900
     2322+ *  Operation would have caused the process
                                             010425    5012000
     2323+D EAGAIN          C                   3406
                                              000000    5012100
     2324+ *  Interrupted function call.
                                              010425    5012200
     2325+D EINTR           C                   3407
                                              000000    5012300
     2326+ *  The address used for an argument was no
                                             010425    5012400
     2327+D EFAULT          C                   3408
                                              000000    5012500
     2328+ *  Operation timed out
                                             010425    5012600
     2329+D ETIME           C                   3409
                                              000000    5012700
     2330+ *  No such device or address
                                             010425    5012800
     2331+D ENXIO           C                   3415
                                              000000    5012900
     2332+ *  Socket closed
                                             010425    5013000
     2333+D ECLOSED         C                   3417
                                              000000    5013100
     2334+ *  Address already in use.
                                             010425    5013200
     2335+D EADDRINUSE      C                   3420
                                              000000    5013300
     2336+ *  Address not available.
                                              010425    5013400
     2337+D EADDRNOTAVAIL   C                   3421
                                              000000    5013500
     2338+ *  The type of socket is not supported in
                                              010425    5013600
     2339+D EAFNOSUPPORT    C                   3422
                                              000000    5013700
     2340+ *  Operation already in progress.
                                              010425    5013800
     2341+D EALREADY        C                   3423
                                              000000    5013900
     2342+ *  Connection ended abnormally.
                                              010425    5014000
     2343+D ECONNABORTED    C                   3424
                                              000000    5014100
     2344+ *  A remote host refused an attempted conn
                                             010425    5014200
     2345+D ECONNREFUSED    C                   3425
                                              000000    5014300
     2346+ *  A connection with a remote socket was r
                                             010425    5014400
     2347+D ECONNRESET      C                   3426
                                              000000    5014500
     2348+ *  Operation requires destination address.
                                             010425    5014600
     2349+D EDESTADDRREQ    C                   3427
                                              000000    5014700
     2350+ *  A remote host is not available.
                                             010425    5014800
     2351+D EHOSTDOWN       C                   3428
                                              000000    5014900
     2352+ *  A route to the remote host is not avail
                                             010425    5015000
     2353+D EHOSTUNREACH    C                   3429
                                              000000    5015100
     2354+ *  Operation in progress.
                                              010425    5015200
     2355+D EINPROGRESS     C                   3430
                                              000000    5015300
     2356+ *  A connection has already been establish
                                             010425    5015400
     2357+D EISCONN         C                   3431
                                              000000    5015500
     2358+ *  Message size out of range.
                                              010425    5015600
     2359+D EMSGSIZE        C                   3432
                                              000000    5015700
     2360+ *  The network is not currently available.
                                             010425    5015800
     2361+D ENETDOWN        C                   3433
                                              000000    5015900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   45
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2362+ *  A socket is connected to a host that is
                                             010425    5016000
     2363+D ENETRESET       C                   3434
                                              000000    5016100
     2364+ *  Cannot reach the destination network.
                                             010425    5016200
     2365+D ENETUNREACH     C                   3435
                                              000000    5016300
     2366+ *  There is not enough buffer space for th
                                             010425    5016400
     2367+D ENOBUFS         C                   3436
                                              000000    5016500
     2368+ *  The protocol does not support the speci
                                             010425    5016600
     2369+D ENOPROTOOPT     C                   3437
                                              000000    5016700
     2370+ *  Requested operation requires a connecti
                                             010425    5016800
     2371+D ENOTCONN        C                   3438
                                              000000    5016900
     2372+ *  The specified descriptor does not refer
                                             010425    5017000
     2373+D ENOTSOCK        C                   3439
                                              000000    5017100
     2374+ *  Operation not supported.
                                              010425    5017200
     2375+D ENOTSUP         C                   3440
                                              000000    5017300
     2376+ *  Operation not supported.
                                              010425    5017400
     2377+D EOPNOTSUPP      C                   3440
                                              000000    5017500
     2378+ *  The socket protocol family is not suppo
                                             010425    5017600
     2379+D EPFNOSUPPORT    C                   3441
                                              000000    5017700
     2380+ *  No protocol of the specified type and d
                                             010425    5017800
     2381+D EPROTONO...
                                             010425    5017900
     2382+DSUPPORT          C                   3442
                                              010425    5018000
     2383+ *  The socket type or protocols are not co
                                             010425    5018100
     2384+D EPROTOTYPE      C                   3443
                                              000000    5018200
     2385+ *  An error indication was sent by the pee
                                             010425    5018300
     2386+D ERCVDERR        C                   3444
                                              000000    5018400
     2387+ *  Cannot send data after a shutdown.
                                              010425    5018500
     2388+D ESHUTDOWN       C                   3445
                                              000000    5018600
     2389+ *  The specified socket type is not suppor
                                             010425    5018700
     2390+D ESOCKTNO...
                                             010425    5018800
     2391+D SUPPORT         C                   3446
                                              010425    5018900
     2392+ *  A remote host did not respond within th
                                             010425    5019000
     2393+D ETIMEDOUT       C                   3447
                                              000000    5019100
     2394+ *  The protocol required to support the sp
                                             010425    5019200
     2395+D EUNATCH         C                   3448
                                              000000    5019300
     2396+ *  Descriptor not valid.
                                             010425    5019400
     2397+D EBADF           C                   3450
                                              000000    5019500
     2398+ *  Too many open files for this process.
                                             010425    5019600
     2399+D EMFILE          C                   3452
                                              000000    5019700
     2400+ *  Too many open files in the system.
                                              010425    5019800
     2401+D ENFILE          C                   3453
                                              000000    5019900
     2402+ *  Broken pipe.
                                              010425    5020000
     2403+D EPIPE           C                   3455
                                              000000    5020100
     2404+ *  File exists.
                                              010425    5020200
     2405+D EEXIST          C                   3457
                                              000000    5020300
     2406+ *  Resource deadlock avoided.
                                              010425    5020400
     2407+D EDEADLK         C                   3459
                                              000000    5020500
     2408+ *  Storage allocation request failed.
                                              010425    5020600
     2409+D ENOMEM          C                   3460
                                              000000    5020700
     2410+ *  The synchronization object no longer ex
                                             010425    5020800
     2411+D EOWNERTERM      C                   3462
                                              000000    5020900
     2412+ * The synchronization object was destroyed
                                             010425    5021000
     2413+D EDESTROYED      C                   3463
                                              000000    5021100
     2414+ *  Operation terminated.
                                             010425    5021200
     2415+D ETERM           C                   3464
                                              000000    5021300
     2416+ *  Maximum link count for a file was excee
                                             010425    5021400
     2417+D EMLINK          C                   3468
                                              000000    5021500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   46
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2418+ *  Seek request not supported for object.
                                              010425    5021600
     2419+D ESPIPE          C                   3469
                                              000000    5021700
     2420+ *  Function not implemented.
                                             010425    5021800
     2421+D ENOSYS          C                   3470
                                              000000    5021900
     2422+ *  Specified target is a directory.
                                              010425    5022000
     2423+D EISDIR          C                   3471
                                              000000    5022100
     2424+ *  Read-only file system.
                                              010425    5022200
     2425+D EROFS           C                   3472
                                              000000    5022300
     2426+ *  Unknown system state.
                                             010425    5022400
     2427+D EUNKNOWN        C                   3474
                                              000000    5022500
     2428+ *  Iterator is invalid.
                                              010425    5022600
     2429+D EITERBAD        C                   3475
                                              000000    5022700
     2430+ *  A damaged object was encountered.
                                             010425    5022800
     2431+D EDAMAGE         C                   3484
                                              000000    5022900
     2432+ *  A loop exists in the symbolic links.
                                              010425    5023000
     2433+D ELOOP           C                   3485
                                              000000    5023100
     2434+ *  A path name is too long.
                                              010425    5023200
     2435+D ENAMETOOLONG    C                   3486
                                              000000    5023300
     2436+ *  No locks available
                                              010425    5023400
     2437+D ENOLCK          C                   3487
                                              000000    5023500
     2438+ *  Directory not empty.
                                              010425    5023600
     2439+D ENOTEMPTY       C                   3488
                                              000000    5023700
     2440+ *  System resources not available to compl
                                             010425    5023800
     2441+D ENOSYSRSC       C                   3489
                                              000000    5023900
     2442+ *  Conversion error.
                                             010425    5024000
     2443+D ECONVERT        C                   3490
                                              000000    5024100
     2444+ *  Argument list too long.
                                             010425    5024200
     2445+D E2BIG           C                   3491
                                              000000    5024300
     2446+ *  Conversion stopped due to input charact
                                             010425    5024400
     2447+D EILSEQ          C                   3492
                                              000000    5024500
     2448+ * Object has soft damage.
                                              010425    5024600
     2449+D ESOFTDAMAGE     C                   3497
                                              000000    5024700
     2450+ *  User not enrolled in system distributio
                                             010425    5024800
     2451+D ENOTENROLL      C                   3498
                                              000000    5024900
     2452+ *  Object is suspended.
                                              010425    5025000
     2453+D EOFFLINE        C                   3499
                                              000000    5025100
     2454+ * Object is a read only object.
                                              010425    5025200
     2455+D EROOBJ          C                   3500
                                              000000    5025300
     2456+ * Area being read from or written to is lo
                                             010425    5025400
     2457+D ELOCKED         C                   3506
                                              000000    5025500
     2458+ * Object too large.
                                              010425    5025600
     2459+D EFBIG           C                   3507
                                              000000    5025700
     2460+ * The semaphore, shared memory, or message
                                             010425    5025800
     2461+D EIDRM           C                   3509
                                              000000    5025900
     2462+ * The queue does not contain a message of
                                              010425    5026000
     2463+D ENOMSG          C                   3510
                                              000000    5026100
     2464+ * File ID conversion of a directory failed
                                             010425    5026200
     2465+D EFILECVT        C                   3511
                                              000000    5026300
     2466+ * A File ID could not be assigned when lin
                                             010425    5026400
     2467+D EBADFID         C                   3512
                                              000000    5026500
     2468+ * A File ID could not be assigned when lin
                                             010425    5026600
     2469+D ESTALE          C                   3513
                                              000000    5026700
     2470+ * No such process.
                                             010425    5026800
     2471+D ESRCH           C                   3515
                                              000000    5026900
     2472+ * Process not enabled for signals.
                                             010425    5027000
     2473+D ENOTSIGINIT     C                   3516
                                              000000    5027100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   47
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2474+ * No child process.
                                              010425    5027200
     2475+D ECHILD          C                   3517
                                              000000    5027300
     2476+ * The operation would have exceeded the ma
                                             010425    5027400
     2477+D ETOOMANYREFS    C                   3523
                                              000000    5027500
     2478+ * Function not allowed.
                                              010425    5027600
     2479+D ENOTSAFE        C                   3524
                                              000000    5027700
     2480+ * Object is too large to process.
                                              010425    5027800
     2481+D EOVERFLOW       C                   3525
                                              000000    5027900
     2482+ * Journal damaged.
                                             010425    5028000
     2483+D EJRNDAMAGE      C                   3526
                                              000000    5028100
     2484+ * Journal inactive.
                                              010425    5028200
     2485+D EJRNINACTIVE    C                   3527
                                              000000    5028300
     2486+ * Journal space or system storage error.
                                             010425    5028400
     2487+D EJRNRCVSPC      C                   3528
                                              000000    5028500
     2488+ * Journal is remote.
                                             010425    5028600
     2489+D EJRNRMT         C                   3529
                                              000000    5028700
     2490+ * New journal receiver is needed.
                                              010425    5028800
     2491+D ENEWJRNRCV      C                   3530
                                              000000    5028900
     2492+ * New journal is needed.
                                             010425    5029000
     2493+D ENEWJRN         C                   3531
                                              000000    5029100
     2494+ * Object already journaled.
                                              010425    5029200
     2495+D EJOURNALED      C                   3532
                                              000000    5029300
     2496+ * Entry too large to send.
                                             010425    5029400
     2497+D EJRNENTTOOLONG  C                   3533
                                              000000    5029500
     2498+ * Object is a Datalink object.
                                             010425    5029600
     2499+D EDATALINK       C                   3534
                                              000000    5029700
     2500+
                                              010715    5029800
     2501+ * The following values are defined by POSIX ISO/IEC
   9945-1:1990                                          010715    5029900
     2502+ *  (these were also taken from QCLE/H member ERRNO)
                                              010715    5030000
     2503+
                                              010715    5030100
     2504+ * invalid argument
                                             010715    5030200
     2505+D EINVAL          C                   3021
                                              010715    5030300
     2506+ * input/output error
                                             010715    5030400
     2507+D EIO             C                   3006
                                              010715    5030500
     2508+ * no such device
                                             010715    5030600
     2509+D ENODEV          C                   3007
                                              010715    5030700
     2510+ * resource busy
                                              010715    5030800
     2511+D EBUSY           C                   3029
                                              010715    5030900
     2512+ * no such file or library
                                              010715    5031000
     2513+D ENOENT          C                   3025
                                              010715    5031100
     2514+ * operation not permitted
                                              010715    5031200
     2515+D EPERM           C                   3027
                                              010715    5031300
     2516+
                                              010715    5031400
     2517+
   *-------------------------------------------------------------------
                                     010715    5031500
     2518+ * prototype definitions
                                              010715    5031600
     2519+
   *-------------------------------------------------------------------
                                     010715    5031700
     2520+D sys_errno       PR              *   ExtProc('__errno')
                                              070907    5031800
     2521+
                                              010425    5031900
     2522+D strerror        PR              *   ExtProc('strerror')
                                             010425    5032000
     2523+D    errnum                     10I 0 value
                                             010425    5032100
     2524+
                                              010425    5032200
     2525+D perror          PR                  ExtProc('perror')
                                             010425    5032300
     2526+D    comment                      *   value options(*string)
                                              010425    5032400
     2527+
                                              010425    5032500
     2528+ /if not defined(SOCKUTIL_H)
                                              010628    5032600
     2529+D errno           PR            10I 0
                                             010425    5032700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   48
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2530+ /endif
                                             010425    5032800
     2531+ /endif
                                             010628    5032900
     2532+
                                              010425    5033000
     2533+
   *-------------------------------------------------------------------
                                     010715    5033100
     2534+ * procedure definitions:
                                             010715    5033200
     2535+
   *-------------------------------------------------------------------
                                     010715    5033300
     2536+ /if not defined(SOCKUTIL_H)
                                              010628    5033400
     2537+ /if defined(ERRNO_LOAD_PROCEDURE)
                                              010425    5033500
               LINES EXCLUDED: 7
     2538+ /endif
                                             010425    5034300
     2539+ /endif
                                             010628    5034400
     2540+
                                              010628    5034500
     2541+ /define ERRNO_H
                                              010628    5034600
     2542  /copy QRPGLESRC,IFSIO_H
                                              000000     006800

   *---------------------------------------------------------------------
   -----------------------*
           * Nombre de miembro RPG  . . :  IFSIO_H
                                  *                     6
           * Nombre externo . . . . . . :  DPTLIB/QRPGLESRC(IFSIO_H)
                                  *                     6
           * Ultimo cambio  . . . . . . :  18/02/10  10:46:20
                                 *                     6

   *---------------------------------------------------------------------
   -----------------------*
     2543+/*-
                  +                          000000    6000100
     2544+ * Copyright (c) 2002-2006 Scott C. Klement
                  +                          000000    6000200
     2545+ * All rights reserved.
                  +                          000000    6000300
     2546+ *
                   +                          000000    6000400
     2547+ * Redistribution and use in source and binary forms, with or
   without          +                          000000    6000500
     2548+ * modification, are permitted provided that the following
   conditions          +                          000000    6000600
     2549+ * are met:
                  +                          000000    6000700
     2550+ * 1. Redistributions of source code must retain the above
   copyright           +                          000000    6000800
     2551+ *    notice, this list of conditions and the following
   disclaimer.            +                          000000    6000900
     2552+ * 2. Redistributions in binary form must reproduce the above
   copyright        +                          000000    6001000
     2553+ *    notice, this list of conditions and the following
   disclaimer in the      +                          000000    6001100
     2554+ *    documentation and/or other materials provided with the
   distribution.     +                          000000    6001200
     2555+ *
                   +                          000000    6001300
     2556+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS
   ``AS IS'' AND      +                          000000    6001400
     2557+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   LIMITED TO, THE       +                          000000    6001500
     2558+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
   PARTICULAR PURPOSE  +                          000000    6001600
     2559+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR
   CONTRIBUTORS BE LIABLE     +                          000000
   6001700
     2560+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   CONSEQUENTIAL  +                          000000    6001800
     2561+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   SUBSTITUTE GOODS     +                          000000    6001900
     2562+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   INTERRUPTION)       +                          000000    6002000
     2563+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   CONTRACT, STRICT  +                          000000    6002100
     2564+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   ARISING IN ANY WAY   +                          000000    6002200
     2565+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   POSSIBILITY OF      +                          000000    6002300
     2566+ * SUCH DAMAGE.
                  +                          000000    6002400
     2567+ *
                   +                          000000    6002500
     2568+ */
                  +                          000000    6002600
     2569+D/if defined(IFSIO_H)
                                             000000    6002700
               LINES EXCLUDED: 1
     2570+D/endif
                                             000000    6002900
     2571+
                                              000000    6003000
     2572+D/define IFSIO_H
                                              000000    6003100
     2573+
                                              000000    6003200
     2574+
   **********************************************************************
                                     000000    6003300
     2575+ * Some CCSID definitions that I've found useful
                                              000000    6003400
     2576+
   **********************************************************************
                                     000000    6003500
     2577+D CP_MSDOS        C                   437
                                             000000    6003600
     2578+D CP_ISO8859_1    C                   819
                                             000000    6003700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   49
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2579+D CP_WINDOWS      C                   1252
                                              000000    6003800
     2580+D CP_UTF8         C                   1208
                                              000000    6003900
     2581+D CP_UCS2         C                   1200
                                              000000    6004000
     2582+D CP_CURJOB       C                   0
                                             000000    6004100
     2583+
                                              000000    6004200
     2584+
   **********************************************************************
                                     000000    6004300
     2585+ *  Flags for use in open()
                                             000000    6004400
     2586+ *
                                              000000    6004500
     2587+ * More than one can be used -- add them together.
                                              000000    6004600
     2588+
   **********************************************************************
                                     000000    6004700
     2589+ *  00000000000000000000000000000001          Reading Only
                                              000000    6004800
     2590+D O_RDONLY        C                   1
                                             000000    6004900
     2591+ *  00000000000000000000000000000010          Writing Only
                                              000000    6005000
     2592+D O_WRONLY        C                   2
                                             000000    6005100
     2593+ *  00000000000000000000000000000100          Reading & Writing
                                             000000    6005200
     2594+D O_RDWR          C                   4
                                             000000    6005300
     2595+ *  00000000000000000000000000001000          Create File if
   needed                                       000000    6005400
     2596+D O_CREAT         C                   8
                                             000000    6005500
     2597+ *  00000000000000000000000000010000          Exclusively
   create --                                       000000    6005600
     2598+ *                                              open will fail
   if it                                      000000    6005700
     2599+ *                                              already exists.
                                             000000    6005800
     2600+D O_EXCL          C                   16
                                              000000    6005900
     2601+ *  00000000000000000000000000100000          Assign a CCSID to
   new                                       000000    6006000
     2602+ *                                            file.
                                             000000    6006100
     2603+D O_CCSID         C                   32
                                              000000    6006200
     2604+ *  00000000000000000000000001000000          Truncate file to
   0 bytes                                    000000    6006300
     2605+D O_TRUNC         C                   64
                                              000000    6006400
     2606+ *  00000000000000000000000100000000          Append to file
                                              000000    6006500
     2607+ *                                            (write data at
   end only)                                    000000    6006600
     2608+D O_APPEND        C                   256
                                             000000    6006700
     2609+ *  00000000000000000000010000000000          Synchronous write
                                             000000    6006800
     2610+D O_SYNC          C                   1024
                                              000000    6006900
     2611+ *  00000000000000000000100000000000          Sync write, data
   only                                       000000    6007000
     2612+D O_DSYNC         C                   2048
                                              000000    6007100
     2613+ *  00000000000000000001000000000000          Sync read
                                             000000    6007200
     2614+D O_RSYNC         C                   4096
                                              000000    6007300
     2615+ *  00000000000000001000000000000000          No controlling
   terminal                                     000000    6007400
     2616+D O_NOCTTY        C                   32768
                                             000000    6007500
     2617+ *  00000000000000010000000000000000          Share with
   readers only                                     000000    6007600
     2618+D O_SHARE_RDONLY  C                   65536
                                             000000    6007700
     2619+ *  00000000000000100000000000000000          Share with
   writers only                                     000000    6007800
     2620+D O_SHARE_WRONLY  C                   131072
                                              000000    6007900
     2621+ *  00000000000001000000000000000000          Share with read &
   write                                     000000    6008000
     2622+D O_SHARE_RDWR    C                   262144
                                              000000    6008100
     2623+ *  00000000000010000000000000000000          Share with
   nobody.                                          000000    6008200
     2624+D O_SHARE_NONE    C                   524288
                                              000000    6008300
     2625+ *  00000000100000000000000000000000          Assign a code
   page                                          000000    6008400
     2626+D O_CODEPAGE      C                   8388608
                                             000000    6008500
     2627+ *  00000001000000000000000000000000          Open in text-mode
                                             000000    6008600
     2628+D O_TEXTDATA      C                   16777216
                                              000000    6008700
     2629+ /if defined(*V5R2M0)
                                             000000    6008800
     2630+ *  00000010000000000000000000000000          Allow text
   translation                                      000000    6008900
     2631+ *                                            on newly created
   file.                                      000000    6009000
     2632+ * Note: O_TEXT_CREAT requires all of the following flags to
   work:                                        000000    6009100
     2633+ *           O_CREAT+O_TEXTDATA+(O_CODEPAGE or O_CCSID)
                                             000000    6009200
     2634+D O_TEXT_CREAT    C                   33554432
                                              000000    6009300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   50
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2635+ /endif
                                             000000    6009400
     2636+ *  00001000000000000000000000000000          Inherit mode from
   dir                                       000000    6009500
     2637+D O_INHERITMODE   C                   134217728
                                             000000    6009600
     2638+ *  00100000000000000000000000000000          Large file access
                                             000000    6009700
     2639+ *                                            (for >2GB files)
                                              000000    6009800
     2640+D O_LARGEFILE     C                   536870912
                                             000000    6009900
     2641+
                                              000000    6010000
     2642+
   **********************************************************************
                                     000000    6010100
     2643+ * Access mode flags for access() and accessx()
                                             000000    6010200
     2644+ *
                                              000000    6010300
     2645+ *   F_OK = File Exists
                                             000000    6010400
     2646+ *   R_OK = Read Access
                                             000000    6010500
     2647+ *   W_OK = Write Access
                                              000000    6010600
     2648+ *   X_OK = Execute or Search
                                             000000    6010700
     2649+
   **********************************************************************
                                     000000    6010800
     2650+D F_OK            C                   0
                                             000000    6010900
     2651+D R_OK            C                   4
                                             000000    6011000
     2652+D W_OK            C                   2
                                             000000    6011100
     2653+D X_OK            C                   1
                                             000000    6011200
     2654+
                                              000000    6011300
     2655+
   **********************************************************************
                                     000000    6011400
     2656+ * class of users flags for accessx()
                                             000000    6011500
     2657+ *
                                              000000    6011600
     2658+ *   ACC_SELF = Check access based on effective uid/gid
                                             000000    6011700
     2659+ *   ACC_INVOKER = Check access based on real uid/gid
                                             000000    6011800
     2660+ *                 ( this is equvalent to calling access() )
                                              000000    6011900
     2661+ *   ACC_OTHERS = Check access of someone not the owner
                                             000000    6012000
     2662+ *   ACC_ALL = Check access of all users
                                              000000    6012100
     2663+
   **********************************************************************
                                     000000    6012200
     2664+D ACC_SELF        C                   0
                                             000000    6012300
     2665+D ACC_INVOKER     C                   1
                                             000000    6012400
     2666+D ACC_OTHERS      C                   8
                                             000000    6012500
     2667+D ACC_ALL         C                   32
                                              000000    6012600
     2668+
                                              000000    6012700
     2669+
   **********************************************************************
                                     000000    6012800
     2670+ *      Mode Flags.
                                             000000    6012900
     2671+ *         basically, the mode parm of open(), creat(),
   chmod(),etc                                       000000    6013000
     2672+ *         uses 9 least significant bits to determine the
                                             000000    6013100
     2673+ *         file's mode. (peoples access rights to the file)
                                             000000    6013200
     2674+ *
                                              000000    6013300
     2675+ *           user:       owner    group    other
                                              000000    6013400
     2676+ *           access:     R W X    R W X    R W X
                                              000000    6013500
     2677+ *           bit:        8 7 6    5 4 3    2 1 0
                                              000000    6013600
     2678+ *
                                              000000    6013700
     2679+ * (This is accomplished by adding the flags below to get the
   mode)                                       000000    6013800
     2680+
   **********************************************************************
                                     000000    6013900
     2681+ *                                         owner authority
                                              000000    6014000
     2682+D S_IRUSR         C                   256
                                             000000    6014100
     2683+D S_IWUSR         C                   128
                                             000000    6014200
     2684+D S_IXUSR         C                   64
                                              000000    6014300
     2685+D S_IRWXU         C                   448
                                             000000    6014400
     2686+ *                                         group authority
                                              000000    6014500
     2687+D S_IRGRP         C                   32
                                              000000    6014600
     2688+D S_IWGRP         C                   16
                                              000000    6014700
     2689+D S_IXGRP         C                   8
                                             000000    6014800
     2690+D S_IRWXG         C                   56
                                              000000    6014900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   51
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2691+ *                                         other people
                                             000000    6015000
     2692+D S_IROTH         C                   4
                                             000000    6015100
     2693+D S_IWOTH         C                   2
                                             000000    6015200
     2694+D S_IXOTH         C                   1
                                             000000    6015300
     2695+D S_IRWXO         C                   7
                                             000000    6015400
     2696+ *                                         special modes:
                                             000000    6015500
     2697+ *                                         restrict
   rename/unlink                                         000000
   6015600
     2698+D S_ISVTX         C                    512
                                              000000    6015700
     2699+ *                                         Set effective GID
                                              000000    6015800
     2700+D S_ISGID         C                   1024
                                              000000    6015900
     2701+ *                                         Set effective UID
                                              000000    6016000
     2702+D S_ISUID         C                   2048
                                              000000    6016100
     2703+
                                              000000    6016200
     2704+
   **********************************************************************
                                     000000    6016300
     2705+ * My own special MODE shortcuts for open() (instead of those
   above)                                      000000    6016400
     2706+
   **********************************************************************
                                     000000    6016500
     2707+D M_RDONLY        C                   const(292)
                                              000000    6016600
     2708+D M_RDWR          C                   const(438)
                                              000000    6016700
     2709+D M_RWX           C                   const(511)
                                              000000    6016800
     2710+
                                              000000    6016900
     2711+
   **********************************************************************
                                     000000    6017000
     2712+ * "whence" constants for use with seek(), lseek() and others
                                             000000    6017100
     2713+
   **********************************************************************
                                     000000    6017200
     2714+ /if not defined(SEEK_WHENCE_VALUES)
                                              000000    6017300
     2715+D SEEK_SET        C                   CONST(0)
                                              000000    6017400
     2716+D SEEK_CUR        C                   CONST(1)
                                              000000    6017500
     2717+D SEEK_END        C                   CONST(2)
                                              000000    6017600
     2718+ /define SEEK_WHENCE_VALUES
                                             000000    6017700
     2719+ /endif
                                             000000    6017800
     2720+
                                              000000    6017900
     2721+
   **********************************************************************
                                     000000    6018000
     2722+ * flags specified in the f_flags element of the ds_statvfs
                                             000000    6018100
     2723+ *   data structure used by the statvfs() API
                                             000000    6018200
     2724+
   **********************************************************************
                                     000000    6018300
     2725+D ST_RDONLY...
                                              000000    6018400
     2726+D                 C                   CONST(1)
                                              000000    6018500
     2727+D ST_NOSUID...
                                              000000    6018600
     2728+D                 C                   CONST(2)
                                              000000    6018700
     2729+D ST_CASE_SENSITITIVE...
                                              000000    6018800
     2730+D                 C                   CONST(4)
                                              000000    6018900
     2731+D ST_CHOWN_RESTRICTED...
                                              000000    6019000
     2732+D                 C                   CONST(8)
                                              000000    6019100
     2733+D ST_THREAD_SAFE...
                                             000000    6019200
     2734+D                 C                   CONST(16)
                                             000000    6019300
     2735+D ST_DYNAMIC_MOUNT...
                                             000000    6019400
     2736+D                 C                   CONST(32)
                                             000000    6019500
     2737+D ST_NO_MOUNT_OVER...
                                             000000    6019600
     2738+D                 C                   CONST(64)
                                             000000    6019700
     2739+D ST_NO_EXPORTS...
                                              000000    6019800
     2740+D                 C                   CONST(128)
                                              000000    6019900
     2741+D ST_SYNCHRONOUS...
                                             000000    6020000
     2742+D                 C                   CONST(256)
                                              000000    6020100
     2743+
                                              000000    6020200
     2744+
   **********************************************************************
                                     000000    6020300
     2745+ * Constants used by pathconf() API
                                             000000    6020400
     2746+
   **********************************************************************
                                     000000    6020500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   52
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2747+D PC_CHOWN_RESTRICTED...
                                              000000    6020600
     2748+D                 C                   0
                                             000000    6020700
     2749+D PC_LINK_MAX...
                                              000000    6020800
     2750+D                 C                   1
                                             000000    6020900
     2751+D PC_MAX_CANON...
                                             000000    6021000
     2752+D                 C                   2
                                             000000    6021100
     2753+D PC_MAX_INPUT...
                                             000000    6021200
     2754+D                 C                   3
                                             000000    6021300
     2755+D PC_NAME_MAX...
                                              000000    6021400
     2756+D                 C                   4
                                             000000    6021500
     2757+D PC_NO_TRUNC...
                                              000000    6021600
     2758+D                 C                   5
                                             000000    6021700
     2759+D PC_PATH_MAX...
                                              000000    6021800
     2760+D                 C                   6
                                             000000    6021900
     2761+D PC_PIPE_BUF...
                                              000000    6022000
     2762+D                 C                   7
                                             000000    6022100
     2763+D PC_VDISABLE...
                                              000000    6022200
     2764+D                 C                   8
                                             000000    6022300
     2765+D PC_THREAD_SAFE...
                                             000000    6022400
     2766+D                 C                   9
                                             000000    6022500
     2767+
                                              000000    6022600
     2768+
   **********************************************************************
                                     000000    6022700
     2769+ * Constants used by sysconf() API
                                              000000    6022800
     2770+
   **********************************************************************
                                     000000    6022900
     2771+D SC_CLK_TCK...
                                             000000    6023000
     2772+D                 C                   2
                                             000000    6023100
     2773+D SC_NGROUPS_MAX...
                                             000000    6023200
     2774+D                 C                   3
                                             000000    6023300
     2775+D SC_OPEN_MAX...
                                              000000    6023400
     2776+D                 C                   4
                                             000000    6023500
     2777+D SC_STREAM_MAX...
                                              000000    6023600
     2778+D                 C                   5
                                             000000    6023700
     2779+D SC_CCSID...
                                             000000    6023800
     2780+D                 C                   10
                                              000000    6023900
     2781+D SC_PAGE_SIZE...
                                             000000    6024000
     2782+D                 C                   11
                                              000000    6024100
     2783+D SC_PAGESIZE...
                                              000000    6024200
     2784+D                 C                   12
                                              000000    6024300
     2785+
                                              000000    6024400
     2786+
   **********************************************************************
                                     000000    6024500
     2787+ * File Information Structure (stat)
                                              000000    6024600
     2788+ *   struct stat {
                                              000000    6024700
     2789+ *     mode_t         st_mode;       /* File mode
           */                                000000    6024800
     2790+ *     ino_t          st_ino;        /* File serial number
            */                                000000    6024900
     2791+ *     nlink_t        st_nlink;      /* Number of links
           */                                000000    6025000
     2792+ *     unsigned short st_reserved2;  /* Reserved
        @B4A*/                                000000    6025100
     2793+ *     uid_t          st_uid;        /* User ID of the owner of
   file    */                                000000    6025200
     2794+ *     gid_t          st_gid;        /* Group ID of the group
   of file   */                                000000    6025300
     2795+ *     off_t          st_size;       /* For regular files, the
   file                                       000000    6025400
     2796+ *                                      size in bytes
           */                                000000    6025500
     2797+ *     time_t         st_atime;      /* Time of last access
           */                                000000    6025600
     2798+ *     time_t         st_mtime;      /* Time of last data
   modification  */                                000000    6025700
     2799+ *     time_t         st_ctime;      /* Time of last file
   status change */                                000000    6025800
     2800+ *     dev_t          st_dev;        /* ID of device containing
   file    */                                000000    6025900
     2801+ *     size_t         st_blksize;    /* Size of a block of the
   file     */                                000000    6026000
     2802+ *     unsigned long  st_allocsize;  /* Allocation size of the
   file     */                                000000    6026100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   53
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2803+ *     qp0l_objtype_t st_objtype;    /* AS/400 object type
            */                                000000    6026200
     2804+ *     char           st_reserved3;  /* Reserved
        @B4A*/                                000000    6026300
     2805+ *     unsigned short st_codepage;   /* Object data codepage
            */                                000000    6026400
     2806+ *     unsigned short st_ccsid;      /* Object data ccsid
       @AAA*/                                000000    6026500
     2807+ *     dev_t          st_rdev;       /* Device ID (if character
   special */                                000000    6026600
     2808+ *                                   /* or block special file)
        @B4A*/                                000000    6026700
     2809+ *     nlink32_t      st_nlink32;    /* Number of links-32 bit
        @B5C*/                                000000    6026800
     2810+ *     dev64_t        st_rdev64;     /* Device ID - 64 bit form
       @B4A*/                                000000    6026900
     2811+ *     dev64_t        st_dev64;      /* ID of device containing
   file -  */                                000000    6027000
     2812+ *                                   /* 64 bit form.
        @B4A*/                                000000    6027100
     2813+ *     char           st_reserved1[36]; /* Reserved
       @B4A*/                                000000    6027200
     2814+ *     unsigned int   st_ino_gen_id; /* File serial number
   generation id                                  000000    6027300
     2815+ *  };
                                              000000    6027400
     2816+ *
        @A2A*/                                000000    6027500
     2817+
   **********************************************************************
                                     000000    6027600
     2818+D statds          DS                  qualified
                                             000000    6027700
     2819+D                                     BASED(Template)
                                             000000    6027800
     2820+D  st_mode                      10U 0
                                             000000    6027900
     2821+D  st_ino                       10U 0
                                             000000    6028000
     2822+D  st_nlink                      5U 0
                                             000000    6028100
     2823+D  st_reserved2                  5U 0
                                             000000    6028200
     2824+D  st_uid                       10U 0
                                             000000    6028300
     2825+D  st_gid                       10U 0
                                             000000    6028400
     2826+D  st_size                      10I 0
                                             000000    6028500
     2827+D  st_atime                     10I 0
                                             000000    6028600
     2828+D  st_mtime                     10I 0
                                             000000    6028700
     2829+D  st_ctime                     10I 0
                                             000000    6028800
     2830+D  st_dev                       10U 0
                                             000000    6028900
     2831+D  st_blksize                   10U 0
                                             000000    6029000
     2832+D  st_allocsize                 10U 0
                                             000000    6029100
     2833+D  st_objtype                   11A
                                             000000    6029200
     2834+D  st_reserved3                  1A
                                             000000    6029300
     2835+D  st_codepage                   5U 0
                                             000000    6029400
     2836+D  st_ccsid                      5U 0
                                             000000    6029500
     2837+D  st_rdev                      10U 0
                                             000000    6029600
     2838+D  st_nlink32                   10U 0
                                             000000    6029700
     2839+D  st_rdev64                    20U 0
                                             000000    6029800
     2840+D  st_dev64                     20U 0
                                             000000    6029900
     2841+D  st_reserved1                 36A
                                             000000    6030000
     2842+D  st_ino_gen_id                10U 0
                                             000000    6030100
     2843+
                                              000000    6030200
     2844+
                                              000000    6030300
     2845+
   **********************************************************************
                                     000000    6030400
     2846+ * File Information Structure, Large File Enabled (stat64)
                                              000000    6030500
     2847+ *   struct stat64 {
            */                                000000    6030600
     2848+ *     mode_t         st_mode;       /* File mode
           */                                000000    6030700
     2849+ *     ino_t          st_ino;        /* File serial number
            */                                000000    6030800
     2850+ *     uid_t          st_uid;        /* User ID of the owner of
   file    */                                000000    6030900
     2851+ *     gid_t          st_gid;        /* Group ID of the group
   of fileA2A*/                                000000    6031000
     2852+ *     off64_t        st_size;       /* For regular files, the
   file     */                                000000    6031100
     2853+ *                                      size in bytes
           */                                000000    6031200
     2854+ *     time_t         st_atime;      /* Time of last access
           */                                000000    6031300
     2855+ *     time_t         st_mtime;      /* Time of last data
   modification2A*/                                000000    6031400
     2856+ *     time_t         st_ctime;      /* Time of last file
   status changeA*/                                000000    6031500
     2857+ *     dev_t          st_dev;        /* ID of device containing
   file    */                                000000    6031600
     2858+ *     size_t         st_blksize;    /* Size of a block of the
   file     */                                000000    6031700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   54
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2859+ *     nlink_t        st_nlink;      /* Number of links
           */                                000000    6031800
     2860+ *     unsigned short st_codepage;   /* Object data codepage
            */                                000000    6031900
     2861+ *     unsigned long long st_allocsize; /* Allocation size of
   the file2A*/                                000000    6032000
     2862+ *     unsigned int   st_ino_gen_id; /* File serial number
   generationAid*/                                000000    6032100
     2863+ *
            */                                000000    6032200
     2864+ *     qp0l_objtype_t st_objtype;    /* AS/400 object type
            */                                000000    6032300
     2865+ *     char           st_reserved2[5]; /* Reserved
        @B4A*/                                000000    6032400
     2866+ *     dev_t          st_rdev;       /* Device ID (if character
   specialA*/                                000000    6032500
     2867+ *                                   /* or block special file)
        @B4A*/                                000000    6032600
     2868+ *     dev64_t        st_rdev64;     /* Device ID - 64 bit form
       @B4A*/                                000000    6032700
     2869+ *     dev64_t        st_dev64;      /* ID of device containing
   file@-2A*/                                000000    6032800
     2870+ *                                   /* 64 bit form.
        @B4A*/                                000000    6032900
     2871+ *     nlink32_t      st_nlink32;    /* Number of links-32 bit
        @B5A*/                                000000    6033000
     2872+ *     char           st_reserved1[26]; /* Reserved
   @B4A @B5C*/                                000000    6033100
     2873+ *     unsigned short st_ccsid;      /* Object data ccsid
       @AAA*/                                000000    6033200
     2874+ *  };
            */                                000000    6033300
     2875+ *
                                              000000    6033400
     2876+
   **********************************************************************
                                     000000    6033500
     2877+D statds64        DS                  qualified
                                             000000    6033600
     2878+D                                     BASED(Template)
                                             000000    6033700
     2879+D  st_mode                      10U 0
                                             000000    6033800
     2880+D  st_ino                       10U 0
                                             000000    6033900
     2881+D  st_uid                       10U 0
                                             000000    6034000
     2882+D  st_gid                       10U 0
                                             000000    6034100
     2883+D  st_size                      20I 0
                                             000000    6034200
     2884+D  st_atime                     10I 0
                                             000000    6034300
     2885+D  st_mtime                     10I 0
                                             000000    6034400
     2886+D  st_ctime                     10I 0
                                             000000    6034500
     2887+D  st_dev                       10U 0
                                             000000    6034600
     2888+D  st_blksize                   10U 0
                                             000000    6034700
     2889+D  st_nlink                      5U 0
                                             000000    6034800
     2890+D  st_codepage                   5U 0
                                             000000    6034900
     2891+D  st_allocsize                 20U 0
                                             000000    6035000
     2892+D  st_ino_gen_id                10U 0
                                             000000    6035100
     2893+D  st_objtype                   11A
                                             000000    6035200
     2894+D  st_reserved2                  5A
                                             000000    6035300
     2895+D  st_rdev                      10U 0
                                             000000    6035400
     2896+D  st_rdev64                    20U 0
                                             000000    6035500
     2897+D  st_dev64                     20U 0
                                             000000    6035600
     2898+D  st_nlink32                   10U 0
                                             000000    6035700
     2899+D  st_reserved1                 26A
                                             000000    6035800
     2900+D  st_ccsid                      5U 0
                                             000000    6035900
     2901+
                                              000000    6036000
     2902+
   **********************************************************************
                                     000000    6036100
     2903+ * ds_statvfs - data structure to receive file system info
                                              000000    6036200
     2904+ *
                                              000000    6036300
     2905+ *   f_bsize   = file system block size (in bytes)
                                              000000    6036400
     2906+ *   f_frsize  = fundamental block size in bytes.
                                             000000    6036500
     2907+ *                if this is zero, f_blocks, f_bfree and
   f_bavail                                         000000    6036600
     2908+ *                are undefined.
                                              000000    6036700
     2909+ *   f_blocks  = total number of blocks (in f_frsize)
                                             000000    6036800
     2910+ *   f_bfree   = total free blocks in filesystem (in f_frsize)
                                              000000    6036900
     2911+ *   f_bavail  = total blocks available to users (in f_frsize)
                                              000000    6037000
     2912+ *   f_files   = total number of file serial numbers
                                              000000    6037100
     2913+ *   f_ffree   = total number of unused file serial numbers
                                             000000    6037200
     2914+ *   f_favail  = number of available file serial numbers to
   users                                         000000    6037300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   55
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2915+ *   f_fsid    = filesystem ID.  This will be 4294967295 if
   it's                                          000000    6037400
     2916+ *                too large for a 10U 0 field. (see f_fsid64)
                                             000000    6037500
     2917+ *   f_flag    = file system flags (see below)
                                              000000    6037600
     2918+ *   f_namemax = max filename length.  May be 4294967295 to
                                             000000    6037700
     2919+ *                indicate that there is no maximum.
                                              000000    6037800
     2920+ *   f_pathmax = max pathname legnth.  May be 4294967295 to
                                             000000    6037900
     2921+ *                indicate that there is no maximum.
                                              000000    6038000
     2922+ *   f_objlinkmax = maximum number of hard-links for objects
                                              000000    6038100
     2923+ *                other than directories
                                              000000    6038200
     2924+ *   f_dirlinkmax = maximum number of hard-links for
   directories                                          000000    6038300
     2925+ *   f_fsid64  = filesystem id (in a 64-bit integer)
                                              000000    6038400
     2926+ *   f_basetype = null-terminated string containing the file
                                              000000    6038500
     2927+ *                  system type name.  For example, this might
                                              000000    6038600
     2928+ *                  be "root" or "Network File System (NFS)"
                                              000000    6038700
     2929+ *
                                              000000    6038800
     2930+ *  Since f_basetype is null-terminated, you should read it
                                             000000    6038900
     2931+ *  in ILE RPG with:
                                              000000    6039000
     2932+ *       myString = %str(%addr(ds_statvfs.f_basetype))
                                              000000    6039100
     2933+
   **********************************************************************
                                     000000    6039200
     2934+D ds_statvfs      DS                  qualified
                                             000000    6039300
     2935+D                                     BASED(Template)
                                             000000    6039400
     2936+D  f_bsize                      10U 0
                                             000000    6039500
     2937+D  f_frsize                     10U 0
                                             000000    6039600
     2938+D  f_blocks                     20U 0
                                             000000    6039700
     2939+D  f_bfree                      20U 0
                                             000000    6039800
     2940+D  f_bavail                     20U 0
                                             000000    6039900
     2941+D  f_files                      10U 0
                                             000000    6040000
     2942+D  f_ffree                      10U 0
                                             000000    6040100
     2943+D  f_favail                     10U 0
                                             000000    6040200
     2944+D  f_fsid                       10U 0
                                             000000    6040300
     2945+D  f_flag                       10U 0
                                             000000    6040400
     2946+D  f_namemax                    10U 0
                                             000000    6040500
     2947+D  f_pathmax                    10U 0
                                             000000    6040600
     2948+D  f_objlinkmax                 10I 0
                                             000000    6040700
     2949+D  f_dirlinkmax                 10I 0
                                             000000    6040800
     2950+D  f_reserved1                   4A
                                             000000    6040900
     2951+D  f_fsid64                     20U 0
                                             000000    6041000
     2952+D  f_basetype                   80A
                                             000000    6041100
     2953+
                                              000000    6041200
     2954+
                                              000000    6041300
     2955+
   **********************************************************************
                                     000000    6041400
     2956+ * Group Information Structure (group)
                                              000000    6041500
     2957+ *
                                              000000    6041600
     2958+ *  struct group {
                                              000000    6041700
     2959+ *        char    *gr_name;        /* Group name.
          */                                 000000    6041800
     2960+ *        gid_t   gr_gid;          /* Group id.
          */                                 000000    6041900
     2961+ *        char    **gr_mem;        /* A null-terminated list of
   pointers                                  000000    6042000
     2962+ *                                    to the individual member
   names.  */                                 000000    6042100
     2963+ *  };
                                              000000    6042200
     2964+ *
                                              000000    6042300
     2965+
   **********************************************************************
                                     000000    6042400
     2966+D group           DS                  qualified
                                             000000    6042500
     2967+D                                     BASED(Template)
                                             000000    6042600
     2968+D   gr_name                       *
                                             000000    6042700
     2969+D   gr_gid                      10U 0
                                             000000    6042800
     2970+D   gr_mem                        *   DIM(256)
                                              000000    6042900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   56
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     2971+
                                              000000    6043000
     2972+
                                              000000    6043100
     2973+
   **********************************************************************
                                     000000    6043200
     2974+ * User Information Structure (passwd)
                                              000000    6043300
     2975+ *
                                              000000    6043400
     2976+ * (Don't let the name fool you, this structure does not
   contain                                          000000    6043500
     2977+ *  any password information.  Its named after the UNIX file
   that                                         000000    6043600
     2978+ *  contains all of the user info.  That file is "passwd")
                                              000000    6043700
     2979+ *
                                              000000    6043800
     2980+ *   struct passwd {
                                              000000    6043900
     2981+ *        char    *pw_name;            /* User name.
           */                                 000000    6044000
     2982+ *        uid_t   pw_uid;              /* User ID number.
          */                                 000000    6044100
     2983+ *        gid_t   pw_gid;              /* Group ID number.
           */                                 000000    6044200
     2984+ *        char    *pw_dir;             /* Initial working
   directory.   */                                 000000    6044300
     2985+ *        char    *pw_shell;           /* Initial user program.
          */                                 000000    6044400
     2986+ *   };
                                             000000    6044500
     2987+ *
                                              000000    6044600
     2988+
   **********************************************************************
                                     000000    6044700
     2989+D passwd          DS                  qualified
                                             000000    6044800
     2990+D                                     BASED(Template)
                                             000000    6044900
     2991+D  pw_name                        *
                                             000000    6045000
     2992+D  pw_uid                       10U 0
                                             000000    6045100
     2993+D  pw_gid                       10U 0
                                             000000    6045200
     2994+D  pw_dir                         *
                                             000000    6045300
     2995+D  pw_shell                       *
                                             000000    6045400
     2996+
                                              000000    6045500
     2997+
                                              000000    6045600
     2998+
   **********************************************************************
                                     000000    6045700
     2999+ * File Time Structure (utimbuf)
                                              000000    6045800
     3000+ *
                                              000000    6045900
     3001+ * struct utimbuf {
                                             000000    6046000
     3002+ *    time_t     actime;           /*  access time       */
                                             000000    6046100
     3003+ *    time_t     modtime;          /*  modification time */
                                             000000    6046200
     3004+ * };
                                             000000    6046300
     3005+ *
                                              000000    6046400
     3006+
   **********************************************************************
                                     000000    6046500
     3007+D utimbuf         DS                  qualified
                                             000000    6046600
     3008+D                                     BASED(Template)
                                             000000    6046700
     3009+D   actime                      10I 0
                                             000000    6046800
     3010+D   modtime                     10I 0
                                             000000    6046900
     3011+
                                              000000    6047000
     3012+
                                              000000    6047100
     3013+
   **********************************************************************
                                     000000    6047200
     3014+ * Directory Entry Structure (dirent)
                                             000000    6047300
     3015+ *
                                              000000    6047400
     3016+ * struct dirent {
                                              000000    6047500
     3017+ *   char           d_reserved1[16];  /* Reserved
           */                                000000    6047600
     3018+ *   unsigned int   d_fileno_gen_id   /* File number generation
   ID  @A1C*/                                000000    6047700
     3019+ *   ino_t          d_fileno;         /* The file number of the
   file    */                                000000    6047800
     3020+ *   unsigned int   d_reclen;         /* Length of this
   directory entry                                   000000    6047900
     3021+ *                                     * in bytes
           */                                000000    6048000
     3022+ *   int            d_reserved3;      /* Reserved
           */                                000000    6048100
     3023+ *   char           d_reserved4[8];   /* Reserved
           */                                000000    6048200
     3024+ *   qlg_nls_t      d_nlsinfo;        /* National Language
   Information                                    000000    6048300
     3025+ *                                     * about d_name
           */                                000000    6048400
     3026+ *   unsigned int   d_namelen;        /* Length of the name, in
   bytes                                     000000    6048500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   57
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3027+ *                                     * excluding NULL
   terminator      */                                000000    6048600
     3028+ *   char           d_name[_QP0L_DIR_NAME]; /* Name...null
   terminated   */                                000000    6048700
     3029+ *
                                              000000    6048800
     3030+ * };
                                             000000    6048900
     3031+
   **********************************************************************
                                     000000    6049000
     3032+D dirent          ds                  qualified
                                             000000    6049100
     3033+D                                     BASED(Template)
                                             000000    6049200
     3034+D   d_reserv1                   16A
                                             000000    6049300
     3035+D   d_fileno_gen_id...
                                              000000    6049400
     3036+D                               10U 0
                                             000000    6049500
     3037+D   d_fileno                    10U 0
                                             000000    6049600
     3038+D   d_reclen                    10U 0
                                             000000    6049700
     3039+D   d_reserv3                   10I 0
                                             000000    6049800
     3040+D   d_reserv4                    8A
                                             000000    6049900
     3041+D   d_nlsinfo                   12A
                                             000000    6050000
     3042+D    d_nls_ccsid                10I 0 OVERLAY(d_nlsinfo:1)
                                              000000    6050100
     3043+D    d_nls_cntry                 2A   OVERLAY(d_nlsinfo:5)
                                              000000    6050200
     3044+D    d_nls_lang                  3A   OVERLAY(d_nlsinfo:7)
                                              000000    6050300
     3045+D   d_namelen                   10U 0
                                             000000    6050400
     3046+D   d_name                     640A
                                             000000    6050500
     3047+
                                              000000    6050600
     3048+
   **********************************************************************
                                     000000    6050700
     3049+ * I/O Vector Structure
                                             000000    6050800
     3050+ *
                                              000000    6050900
     3051+ *     struct iovec {
                                             000000    6051000
     3052+ *        void    *iov_base;
                                              000000    6051100
     3053+ *        size_t  iov_len;
                                              000000    6051200
     3054+ *     }
                                              000000    6051300
     3055+
   **********************************************************************
                                     000000    6051400
     3056+ /if not defined(IOVEC_DS_DEFINED)
                                              000000    6051500
     3057+D iovec           DS                  qualified
                                             000000    6051600
     3058+D                                     BASED(p_iovec)
                                              000000    6051700
     3059+D  iov_base                       *
                                             000000    6051800
     3060+D  iov_len                      10U 0
                                             000000    6051900
     3061+ /define IOVEC_DS_DEFINED
                                             000000    6052000
     3062+ /endif
                                             000000    6052100
     3063+
                                              000000    6052200
     3064+
   *--------------------------------------------------------------------
                                      000000    6052300
     3065+ * Determine file accessibility
                                             000000    6052400
     3066+ *
                                              000000    6052500
     3067+ * int access(const char *path, int amode)
                                              000000    6052600
     3068+ *
                                              000000    6052700
     3069+
   *--------------------------------------------------------------------
                                      000000    6052800
     3070+D access          PR            10I 0 ExtProc('access')
                                             000000    6052900
     3071+D   Path                          *   Value Options(*string)
                                              000000    6053000
     3072+D   amode                       10I 0 Value
                                             000000    6053100
     3073+
                                              000000    6053200
     3074+
                                              000000    6053300
     3075+
   *--------------------------------------------------------------------
                                      000000    6053400
     3076+ * Determine file accessibility for a class of users
                                              000000    6053500
     3077+ *
                                              000000    6053600
     3078+ * int accessx(const char *path, int amode, int who);
                                             000000    6053700
     3079+ *
                                              000000    6053800
     3080+
   *--------------------------------------------------------------------
                                      000000    6053900
     3081+ /if defined(*V5R2M0)
                                             000000    6054000
     3082+D accessx         PR            10I 0 ExtProc('accessx')
                                              000000    6054100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   58
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3083+D   Path                          *   Value Options(*string)
                                              000000    6054200
     3084+D   amode                       10I 0 Value
                                             000000    6054300
     3085+D   who                         10I 0 value
                                             000000    6054400
     3086+ /endif
                                             000000    6054500
     3087+
                                              000000    6054600
     3088+
   *--------------------------------------------------------------------
                                      000000    6054700
     3089+ * Change Directory
                                             000000    6054800
     3090+ *
                                              000000    6054900
     3091+ * int chdir(const char *path)
                                              000000    6055000
     3092+
   *--------------------------------------------------------------------
                                      000000    6055100
     3093+D chdir           PR            10I 0 ExtProc('chdir')
                                              000000    6055200
     3094+D   path                          *   Value Options(*string)
                                              000000    6055300
     3095+
                                              000000    6055400
     3096+
   *--------------------------------------------------------------------
                                      000000    6055500
     3097+ * Change file authorizations
                                             000000    6055600
     3098+ *
                                              000000    6055700
     3099+ * int chmod(const char *path, mode_t mode)
                                             000000    6055800
     3100+
   *--------------------------------------------------------------------
                                      000000    6055900
     3101+D chmod           PR            10I 0 ExtProc('chmod')
                                              000000    6056000
     3102+D   path                          *   Value options(*string)
                                              000000    6056100
     3103+D   mode                        10U 0 Value
                                             000000    6056200
     3104+
                                              000000    6056300
     3105+
   *--------------------------------------------------------------------
                                      000000    6056400
     3106+ * Change Owner/Group of File
                                             000000    6056500
     3107+ *
                                              000000    6056600
     3108+ * int chown(const char *path, uid_t owner, gid_t group)
                                              000000    6056700
     3109+
   *--------------------------------------------------------------------
                                      000000    6056800
     3110+D chown           PR            10I 0 ExtProc('chown')
                                              000000    6056900
     3111+D   path                          *   Value options(*string)
                                              000000    6057000
     3112+D   owner                       10U 0 Value
                                             000000    6057100
     3113+D   group                       10U 0 Value
                                             000000    6057200
     3114+
                                              000000    6057300
     3115+
   *--------------------------------------------------------------------
                                      000000    6057400
     3116+ * Close a file
                                             000000    6057500
     3117+ *
                                              000000    6057600
     3118+ * int close(int fildes)
                                              000000    6057700
     3119+ *
                                              000000    6057800
     3120+ * Note:  Because the same close() API is used for IFS,
   sockets,                                          000000    6057900
     3121+ *        and pipes, it's conditionally defined here.  If it's
                                              000000    6058000
     3122+ *        done the same in the sockets & pipe /copy members,
                                              000000    6058100
     3123+ *        there will be no conflict.
                                              000000    6058200
     3124+
   *--------------------------------------------------------------------
                                      000000    6058300
     3125+D/if not defined(CLOSE_PROTOTYPE)
                                             000000    6058400
     3126+D close           PR            10I 0 ExtProc('close')
                                              000000    6058500
     3127+D  fildes                       10I 0 value
                                             000000    6058600
     3128+D/define CLOSE_PROTOTYPE
                                              000000    6058700
     3129+D/endif
                                             000000    6058800
     3130+
                                              000000    6058900
     3131+
   *--------------------------------------------------------------------
                                      000000    6059000
     3132+ * Close a directory
                                              000000    6059100
     3133+ *
                                              000000    6059200
     3134+ * int closedir(DIR *dirp)
                                              000000    6059300
     3135+
   *--------------------------------------------------------------------
                                      000000    6059400
     3136+D closedir        PR            10I 0 EXTPROC('closedir')
                                             000000    6059500
     3137+D  dirp                           *   VALUE
                                             000000    6059600
     3138+
                                              000000    6059700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   59
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3139+
   *--------------------------------------------------------------------
                                      000000    6059800
     3140+ * Create or Rewrite File
                                             000000    6059900
     3141+ *
                                              000000    6060000
     3142+ * int creat(const char *path, mode_t mode)
                                             000000    6060100
     3143+ *
                                              000000    6060200
     3144+ * DEPRECATED:  Use open() instead.
                                             000000    6060300
     3145+
   *--------------------------------------------------------------------
                                      000000    6060400
     3146+D creat           PR            10I 0 ExtProc('creat')
                                              000000    6060500
     3147+D   path                          *   Value options(*string)
                                              000000    6060600
     3148+D   mode                        10U 0 Value
                                             000000    6060700
     3149+
                                              000000    6060800
     3150+
   *--------------------------------------------------------------------
                                      000000    6060900
     3151+ * Duplicate open file descriptor
                                             000000    6061000
     3152+ *
                                              000000    6061100
     3153+ * int dup(int fildes)
                                              000000    6061200
     3154+
   *--------------------------------------------------------------------
                                      000000    6061300
     3155+D dup             PR            10I 0 ExtProc('dup')
                                              000000    6061400
     3156+D   fildes                      10I 0 Value
                                             000000    6061500
     3157+
                                              000000    6061600
     3158+
   *--------------------------------------------------------------------
                                      000000    6061700
     3159+ * Duplicate open file descriptor to another descriptor
                                             000000    6061800
     3160+ *
                                              000000    6061900
     3161+ * int dup2(int fildes, int fildes2)
                                              000000    6062000
     3162+
   *--------------------------------------------------------------------
                                      000000    6062100
     3163+D dup2            PR            10I 0 ExtProc('dup2')
                                             000000    6062200
     3164+D   fildes                      10I 0 Value
                                             000000    6062300
     3165+D   fildes2                     10I 0 Value
                                             000000    6062400
     3166+
                                              000000    6062500
     3167+
   *--------------------------------------------------------------------
                                      000000    6062600
     3168+ * Determine file accessibility for a class of users by
   descriptor                                        000000    6062700
     3169+ *
                                              000000    6062800
     3170+ * int faccessx(int filedes, int amode, int who)
                                              000000    6062900
     3171+
   *--------------------------------------------------------------------
                                      000000    6063000
     3172+ /if defined(*V5R2M0)
                                             000000    6063100
     3173+D faccessx        PR            10I 0 ExtProc('faccessx')
                                             000000    6063200
     3174+D   fildes                      10I 0 Value
                                             000000    6063300
     3175+D   amode                       10I 0 Value
                                             000000    6063400
     3176+D   who                         10I 0 Value
                                             000000    6063500
     3177+ /endif
                                             000000    6063600
     3178+
                                              000000    6063700
     3179+
   *--------------------------------------------------------------------
                                      000000    6063800
     3180+ * Change Current Directory by Descriptor
                                             000000    6063900
     3181+ *
                                              000000    6064000
     3182+ * int fchdir(int fildes)
                                             000000    6064100
     3183+
   *--------------------------------------------------------------------
                                      000000    6064200
     3184+ /if defined(*V5R2M0)
                                             000000    6064300
     3185+D fchdir          PR            10I 0 ExtProc('fchdir')
                                             000000    6064400
     3186+D   fildes                      10I 0 value
                                             000000    6064500
     3187+ /endif
                                             000000    6064600
     3188+
                                              000000    6064700
     3189+
   *--------------------------------------------------------------------
                                      000000    6064800
     3190+ * Change file authorizations by descriptor
                                             000000    6064900
     3191+ *
                                              000000    6065000
     3192+ * int fchmod(int fildes, mode_t mode)
                                              000000    6065100
     3193+
   *--------------------------------------------------------------------
                                      000000    6065200
     3194+D fchmod          PR            10I 0 ExtProc('fchmod')
                                             000000    6065300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   60
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3195+D   fildes                      10I 0 Value
                                             000000    6065400
     3196+D   mode                        10U 0 Value
                                             000000    6065500
     3197+
                                              000000    6065600
     3198+
   *--------------------------------------------------------------------
                                      000000    6065700
     3199+ * Change Owner and Group of File by Descriptor
                                             000000    6065800
     3200+ *
                                              000000    6065900
     3201+ * int fchown(int fildes, uid_t owner, gid_t group)
                                             000000    6066000
     3202+
   *--------------------------------------------------------------------
                                      000000    6066100
     3203+D fchown          PR            10I 0 ExtProc('fchown')
                                             000000    6066200
     3204+D   fildes                      10I 0 Value
                                             000000    6066300
     3205+D   owner                       10U 0 Value
                                             000000    6066400
     3206+D   group                       10U 0 Value
                                             000000    6066500
     3207+
                                              000000    6066600
     3208+
   *--------------------------------------------------------------------
                                      000000    6066700
     3209+ * Perform File Control
                                             000000    6066800
     3210+ *
                                              000000    6066900
     3211+ * int fcntl(int fildes, int cmd, . . .)
                                              000000    6067000
     3212+ *
                                              000000    6067100
     3213+ * Note:  Because the same fcntl() API is used for IFS and
   sockets,                                       000000    6067200
     3214+ *        it's conditionally defined here.  If it's defined
   with                                          000000    6067300
     3215+ *        the same conditions in the sockets /copy member,
   there                                          000000    6067400
     3216+ *        will be no conflict.
                                              000000    6067500
     3217+
   *--------------------------------------------------------------------
                                      000000    6067600
     3218+D/if not defined(FCNTL_PROTOTYPE)
                                             000000    6067700
     3219+D fcntl           PR            10I 0 ExtProc('fcntl')
                                              000000    6067800
     3220+D   fildes                      10I 0 Value
                                             000000    6067900
     3221+D   cmd                         10I 0 Value
                                             000000    6068000
     3222+D   arg                         10I 0 Value options(*nopass)
                                              000000    6068100
     3223+D/define FCNTL_PROTOTYPE
                                              000000    6068200
     3224+D/endif
                                             000000    6068300
     3225+
                                              000000    6068400
     3226+
   *--------------------------------------------------------------------
                                      000000    6068500
     3227+ * Get configurable path name variables by descriptor
                                             000000    6068600
     3228+ *
                                              000000    6068700
     3229+ * long fpathconf(int fildes, int name)
                                             000000    6068800
     3230+
   *--------------------------------------------------------------------
                                      000000    6068900
     3231+D fpathconf       PR            10I 0 ExtProc('fpathconf')
                                              000000    6069000
     3232+D   fildes                      10I 0 Value
                                             000000    6069100
     3233+D   name                        10I 0 Value
                                             000000    6069200
     3234+
                                              000000    6069300
     3235+
   *--------------------------------------------------------------------
                                      000000    6069400
     3236+ * Get File Information by Descriptor
                                             000000    6069500
     3237+ *
                                              000000    6069600
     3238+ * int fstat(int fildes, struct stat *buf)
                                              000000    6069700
     3239+
   *--------------------------------------------------------------------
                                      000000    6069800
     3240+D fstat           PR            10I 0 ExtProc('fstat')
                                              000000    6069900
     3241+D   fildes                      10I 0 Value
                                             000000    6070000
     3242+D   buf                               likeds(statds)
                                              000000    6070100
     3243+
                                              000000    6070200
     3244+
   *--------------------------------------------------------------------
                                      000000    6070300
     3245+ * Get File Information by Descriptor, Large File Enabled
                                             000000    6070400
     3246+ *
                                              000000    6070500
     3247+ * int fstat64(int fildes, struct stat *buf)
                                              000000    6070600
     3248+
   *--------------------------------------------------------------------
                                      000000    6070700
     3249+D fstat64         PR            10I 0 ExtProc('fstat64')
                                              000000    6070800
     3250+D   fildes                      10I 0 Value
                                             000000    6070900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   61
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3251+D   buf                               likeds(statds64)
                                              000000    6071000
     3252+
                                              000000    6071100
     3253+
   *--------------------------------------------------------------------
                                      000000    6071200
     3254+ * fstatvfs() -- Get file system status by descriptor
                                             000000    6071300
     3255+ *
                                              000000    6071400
     3256+ *  fildes = (input) file descriptor to use to locate file
   system                                         000000    6071500
     3257+ *     buf = (output) data structure containing file system
   info                                          000000    6071600
     3258+ *
                                              000000    6071700
     3259+ * Returns 0 if successful, -1 upon error.
                                              000000    6071800
     3260+ * (error information is returned via the "errno" variable)
                                             000000    6071900
     3261+
   *--------------------------------------------------------------------
                                      000000    6072000
     3262+D fstatvfs        PR            10I 0 ExtProc('fstatvfs64')
                                             000000    6072100
     3263+D   fildes                      10I 0 value
                                             000000    6072200
     3264+D   buf                               like(ds_statvfs)
                                              000000    6072300
     3265+
                                              000000    6072400
     3266+
   *--------------------------------------------------------------------
                                      000000    6072500
     3267+ * Synchronize Changes to file
                                              000000    6072600
     3268+ *
                                              000000    6072700
     3269+ * int fsync(int fildes)
                                              000000    6072800
     3270+
   *--------------------------------------------------------------------
                                      000000    6072900
     3271+D fsync           PR            10I 0 ExtProc('fsync')
                                              000000    6073000
     3272+D   fildes                      10I 0 Value
                                             000000    6073100
     3273+
                                              000000    6073200
     3274+
   *--------------------------------------------------------------------
                                      000000    6073300
     3275+ * Truncate file
                                              000000    6073400
     3276+ *
                                              000000    6073500
     3277+ * int ftruncate(int fildes, off_t length)
                                              000000    6073600
     3278+
   *--------------------------------------------------------------------
                                      000000    6073700
     3279+D ftruncate       PR            10I 0 ExtProc('ftruncate')
                                              000000    6073800
     3280+D   fildes                      10I 0 Value
                                             000000    6073900
     3281+D   length                      10I 0 Value
                                             000000    6074000
     3282+
                                              000000    6074100
     3283+
   *--------------------------------------------------------------------
                                      000000    6074200
     3284+ * Truncate file, large file enabled
                                              000000    6074300
     3285+ *
                                              000000    6074400
     3286+ * int ftruncate64(int fildes, off64_t length)
                                              000000    6074500
     3287+
   *--------------------------------------------------------------------
                                      000000    6074600
     3288+D ftruncate64     PR            10I 0 ExtProc('ftruncate64')
                                              000000    6074700
     3289+D   fildes                      10I 0 Value
                                             000000    6074800
     3290+D   length                      20I 0 Value
                                             000000    6074900
     3291+
                                              000000    6075000
     3292+
   *--------------------------------------------------------------------
                                      000000    6075100
     3293+ * Get current working directory
                                              000000    6075200
     3294+ *
                                              000000    6075300
     3295+ * char *getcwd(char *buf, size_t size)
                                             000000    6075400
     3296+
   *--------------------------------------------------------------------
                                      000000    6075500
     3297+D getcwd          PR              *   ExtProc('getcwd')
                                             000000    6075600
     3298+D   buf                           *   Value
                                             000000    6075700
     3299+D   size                        10U 0 Value
                                             000000    6075800
     3300+
                                              000000    6075900
     3301+
   *--------------------------------------------------------------------
                                      000000    6076000
     3302+ * Get effective group ID
                                             000000    6076100
     3303+ *
                                              000000    6076200
     3304+ * gid_t getegid(void)
                                              000000    6076300
     3305+
   *--------------------------------------------------------------------
                                      000000    6076400
     3306+D getegid         PR            10U 0 ExtProc('getegid')
                                              000000    6076500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   62
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3307+
                                              000000    6076600
     3308+
   *--------------------------------------------------------------------
                                      000000    6076700
     3309+ * Get effective user ID
                                              000000    6076800
     3310+ *
                                              000000    6076900
     3311+ * uid_t geteuid(void)
                                              000000    6077000
     3312+
   *--------------------------------------------------------------------
                                      000000    6077100
     3313+D geteuid         PR            10U 0 ExtProc('geteuid')
                                              000000    6077200
     3314+
                                              000000    6077300
     3315+
   *--------------------------------------------------------------------
                                      000000    6077400
     3316+ * Get Real Group ID
                                              000000    6077500
     3317+ *
                                              000000    6077600
     3318+ * gid_t getgid(void)
                                             000000    6077700
     3319+
   *--------------------------------------------------------------------
                                      000000    6077800
     3320+D getgid          PR            10U 0 ExtProc('getgid')
                                             000000    6077900
     3321+
                                              000000    6078000
     3322+
   *--------------------------------------------------------------------
                                      000000    6078100
     3323+ * Get group information from group ID
                                              000000    6078200
     3324+ *
                                              000000    6078300
     3325+ * struct group *getgrgid(gid_t gid)
                                              000000    6078400
     3326+
   *--------------------------------------------------------------------
                                      000000    6078500
     3327+D getgrgid        PR              *   ExtProc('getgrgid')
                                             000000    6078600
     3328+D   gid                         10U 0 VALUE
                                             000000    6078700
     3329+
                                              000000    6078800
     3330+
   *--------------------------------------------------------------------
                                      000000    6078900
     3331+ * Get group info using group name
                                              000000    6079000
     3332+ *
                                              000000    6079100
     3333+ * struct group  *getgrnam(const char *name)
                                              000000    6079200
     3334+
   *--------------------------------------------------------------------
                                      000000    6079300
     3335+D getgrnam        PR              *   ExtProc('getgrnam')
                                             000000    6079400
     3336+D   name                          *   VALUE
                                             000000    6079500
     3337+
                                              000000    6079600
     3338+
   *--------------------------------------------------------------------
                                      000000    6079700
     3339+ * Get group IDs
                                              000000    6079800
     3340+ *
                                              000000    6079900
     3341+ * int getgroups(int gidsetsize, gid_t grouplist[])
                                             000000    6080000
     3342+
   *--------------------------------------------------------------------
                                      000000    6080100
     3343+D getgroups       PR              *   ExtProc('getgroups')
                                              000000    6080200
     3344+D   gidsetsize                  10I 0 value
                                             000000    6080300
     3345+D   grouplist                   10U 0 dim(256)
   options(*varsize)                                          000000
   6080400
     3346+
                                              000000    6080500
     3347+
   *--------------------------------------------------------------------
                                      000000    6080600
     3348+ * Get user information by user-name
                                              000000    6080700
     3349+ *
                                              000000    6080800
     3350+ * (Don't let the name mislead you, this does not return the
   password,                                    000000    6080900
     3351+ *  the user info database on unix systems is called "passwd",
                                              000000    6081000
     3352+ *  therefore, getting the user info is called "getpw")
                                             000000    6081100
     3353+ *
                                              000000    6081200
     3354+ * struct passwd *getpwnam(const char *name)
                                              000000    6081300
     3355+
   *--------------------------------------------------------------------
                                      000000    6081400
     3356+D getpwnam        PR              *   ExtProc('getpwnam')
                                             000000    6081500
     3357+D   name                          *   Value options(*string)
                                              000000    6081600
     3358+
                                              000000    6081700
     3359+
   *--------------------------------------------------------------------
                                      000000    6081800
     3360+ * Get user information by user-id number
                                             000000    6081900
     3361+ *
                                              000000    6082000
     3362+ * (Don't let the name mislead you, this does not return the
   password,                                    000000    6082100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   63
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3363+ *  the user info database on unix systems is called "passwd",
                                              000000    6082200
     3364+ *  therefore, getting the user info is called "getpw")
                                             000000    6082300
     3365+ *
                                              000000    6082400
     3366+ * struct passwd *getpwuid(uid_t uid)
                                             000000    6082500
     3367+
   *--------------------------------------------------------------------
                                      000000    6082600
     3368+D getpwuid        PR              *   extproc('getpwuid')
                                             000000    6082700
     3369+D   uid                         10U 0 Value
                                             000000    6082800
     3370+
                                              000000    6082900
     3371+
   *--------------------------------------------------------------------
                                      000000    6083000
     3372+ * Get Real User-ID
                                             000000    6083100
     3373+ *
                                              000000    6083200
     3374+ * uid_t getuid(void)
                                             000000    6083300
     3375+
   *--------------------------------------------------------------------
                                      000000    6083400
     3376+D getuid          PR            10U 0 ExtProc('getuid')
                                             000000    6083500
     3377+
                                              000000    6083600
     3378+
   *--------------------------------------------------------------------
                                      000000    6083700
     3379+ * Perform I/O Control Request
                                              000000    6083800
     3380+ *
                                              000000    6083900
     3381+ * int ioctl(int fildes, unsigned long req, ...)
                                              000000    6084000
     3382+
   *--------------------------------------------------------------------
                                      000000    6084100
     3383+D ioctl           PR            10I 0 ExtProc('ioctl')
                                              000000    6084200
     3384+D   fildes                      10I 0 Value
                                             000000    6084300
     3385+D   req                         10U 0 Value
                                             000000    6084400
     3386+D   arg                           *   Value
                                             000000    6084500
     3387+
                                              000000    6084600
     3388+
   *--------------------------------------------------------------------
                                      000000    6084700
     3389+ * Change Owner/Group of symbolic link
                                              000000    6084800
     3390+ *
                                              000000    6084900
     3391+ * int lchown(const char *path, uid_t owner, gid_t group)
                                             000000    6085000
     3392+ *
                                              000000    6085100
     3393+ * NOTE: for non-symlinks, this behaves identically to chown().
                                             000000    6085200
     3394+ *       for symlinks, this changes ownership of the link,
   whereas                                        000000    6085300
     3395+ *       chown() changes ownership of the file the link points
   to.                                        000000    6085400
     3396+
   *--------------------------------------------------------------------
                                      000000    6085500
     3397+D lchown          PR            10I 0 ExtProc('lchown')
                                             000000    6085600
     3398+D   path                          *   Value options(*string)
                                              000000    6085700
     3399+D   owner                       10U 0 Value
                                             000000    6085800
     3400+D   group                       10U 0 Value
                                             000000    6085900
     3401+
                                              000000    6086000
     3402+
   *--------------------------------------------------------------------
                                      000000    6086100
     3403+ * Create Hard Link to File
                                             000000    6086200
     3404+ *
                                              000000    6086300
     3405+ * int link(const char *existing, const char *new)
                                              000000    6086400
     3406+
   *--------------------------------------------------------------------
                                      000000    6086500
     3407+D link            PR            10I 0 ExtProc('link')
                                             000000    6086600
     3408+D   existing                      *   Value options(*string)
                                              000000    6086700
     3409+D   new                           *   Value options(*string)
                                              000000    6086800
     3410+
                                              000000    6086900
     3411+
   *--------------------------------------------------------------------
                                      000000    6087000
     3412+ * Set File Read/Write Offset
                                             000000    6087100
     3413+ *
                                              000000    6087200
     3414+ * off_t lseek(int fildes, off_t offset, int whence)
                                              000000    6087300
     3415+
   *--------------------------------------------------------------------
                                      000000    6087400
     3416+D lseek           PR            10I 0 ExtProc('lseek')
                                              000000    6087500
     3417+D   fildes                      10I 0 value
                                             000000    6087600
     3418+D   offset                      10I 0 value
                                             000000    6087700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   64
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3419+D   whence                      10I 0 value
                                             000000    6087800
     3420+
                                              000000    6087900
     3421+
   *--------------------------------------------------------------------
                                      000000    6088000
     3422+ * Set File Read/Write Offset, Large File Enabled
                                             000000    6088100
     3423+ *
                                              000000    6088200
     3424+ * off64_t lseek64(int fildes, off64_t offset, int whence)
                                              000000    6088300
     3425+
   *--------------------------------------------------------------------
                                      000000    6088400
     3426+D lseek64         PR            20I 0 ExtProc('lseek64')
                                              000000    6088500
     3427+D   fildes                      10I 0 value
                                             000000    6088600
     3428+D   offset                      20I 0 value
                                             000000    6088700
     3429+D   whence                      10I 0 value
                                             000000    6088800
     3430+
                                              000000    6088900
     3431+
   *--------------------------------------------------------------------
                                      000000    6089000
     3432+ * Get File or Link Information
                                             000000    6089100
     3433+ *
                                              000000    6089200
     3434+ * int lstat(const char *path, struct stat *buf)
                                              000000    6089300
     3435+ *
                                              000000    6089400
     3436+ * NOTE: for non-symlinks, this behaves identically to stat().
                                              000000    6089500
     3437+ *       for symlinks, this gets information about the link,
   whereas                                      000000    6089600
     3438+ *       stat() gets information about the file the link points
   to.                                       000000    6089700
     3439+
   *--------------------------------------------------------------------
                                      000000    6089800
     3440+D lstat           PR            10I 0 ExtProc('lstat')
                                              000000    6089900
     3441+D   path                          *   Value options(*string)
                                              000000    6090000
     3442+D   buf                               likeds(statds)
                                              000000    6090100
     3443+
                                              000000    6090200
     3444+
   *--------------------------------------------------------------------
                                      000000    6090300
     3445+ * Get File or Link Information, Large File Enabled
                                             000000    6090400
     3446+ *
                                              000000    6090500
     3447+ * int lstat64(const char *path, struct stat64 *buf)
                                              000000    6090600
     3448+ *
                                              000000    6090700
     3449+ * NOTE: for non-symlinks, this behaves identically to stat().
                                              000000    6090800
     3450+ *       for symlinks, this gets information about the link,
   whereas                                      000000    6090900
     3451+ *       stat() gets information about the file the link points
   to.                                       000000    6091000
     3452+
   *--------------------------------------------------------------------
                                      000000    6091100
     3453+D lstat64         PR            10I 0 ExtProc('lstat64')
                                              000000    6091200
     3454+D   path                          *   Value options(*string)
                                              000000    6091300
     3455+D   buf                               likeds(statds64)
                                              000000    6091400
     3456+
                                              000000    6091500
     3457+
   *--------------------------------------------------------------------
                                      000000    6091600
     3458+ * Make Directory
                                             000000    6091700
     3459+ *
                                              000000    6091800
     3460+ * int mkdir(const char *path, mode_t mode)
                                             000000    6091900
     3461+
   *--------------------------------------------------------------------
                                      000000    6092000
     3462+D mkdir           PR            10I 0 ExtProc('mkdir')
                                              000000    6092100
     3463+D   path                          *   Value options(*string)
                                              000000    6092200
     3464+D   mode                        10U 0 Value
                                             000000    6092300
     3465+
                                              000000    6092400
     3466+
   *--------------------------------------------------------------------
                                      000000    6092500
     3467+ * Make FIFO Special File
                                             000000    6092600
     3468+ *
                                              000000    6092700
     3469+ * int mkfifo(const char *path, mode_t mode)
                                              000000    6092800
     3470+
   *--------------------------------------------------------------------
                                      000000    6092900
     3471+ /if defined(*V5R1M0)
                                             000000    6093000
     3472+D mkfifo          PR            10I 0 ExtProc('mkfifo')
                                             000000    6093100
     3473+D   path                          *   Value options(*string)
                                              000000    6093200
     3474+D   mode                        10U 0 Value
                                             000000    6093300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   65
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3475+ /endif
                                             000000    6093400
     3476+
                                              000000    6093500
     3477+
   *--------------------------------------------------------------------
                                      000000    6093600
     3478+ * Open a File
                                              000000    6093700
     3479+ *
                                              000000    6093800
     3480+ * int open(const char *path, int oflag, . . .);
                                              000000    6093900
     3481+
   *--------------------------------------------------------------------
                                      000000    6094000
     3482+D open            PR            10I 0 ExtProc('open')
                                             000000    6094100
     3483+D  path                           *   value options(*string)
                                              000000    6094200
     3484+D  openflags                    10I 0 value
                                             000000    6094300
     3485+D  mode                         10U 0 value options(*nopass)
                                              000000    6094400
     3486+D  ccsid                        10U 0 value options(*nopass)
                                              000000    6094500
     3487+D/if defined(*V5R2M0)
                                             000000    6094600
     3488+D  txtcreatid                   10U 0 value options(*nopass)
                                              000000    6094700
     3489+D/endif
                                             000000    6094800
     3490+
                                              000000    6094900
     3491+
   *--------------------------------------------------------------------
                                      000000    6095000
     3492+ * Open a File, Large File Enabled
                                              000000    6095100
     3493+ *
                                              000000    6095200
     3494+ * int open64(const char *path, int oflag, . . .);
                                              000000    6095300
     3495+ *
                                              000000    6095400
     3496+ * NOTE: This is identical to calling open(), except that the
                                             000000    6095500
     3497+ *       O_LARGEFILE flag is automatically supplied.
                                              000000    6095600
     3498+
   *--------------------------------------------------------------------
                                      000000    6095700
     3499+D open64          PR            10I 0 ExtProc('open64')
                                             000000    6095800
     3500+D  filename                       *   value options(*string)
                                              000000    6095900
     3501+D  openflags                    10I 0 value
                                             000000    6096000
     3502+D  mode                         10U 0 value options(*nopass)
                                              000000    6096100
     3503+D  codepage                     10U 0 value options(*nopass)
                                              000000    6096200
     3504+D/if defined(*V5R2M0)
                                             000000    6096300
     3505+D  txtcreatid                   10U 0 value options(*nopass)
                                              000000    6096400
     3506+D/endif
                                             000000    6096500
     3507+
                                              000000    6096600
     3508+
   *--------------------------------------------------------------------
                                      000000    6096700
     3509+ * Open a Directory
                                             000000    6096800
     3510+ *
                                              000000    6096900
     3511+ * DIR *opendir(const char *dirname)
                                              000000    6097000
     3512+
   *--------------------------------------------------------------------
                                      000000    6097100
     3513+D opendir         PR              *   EXTPROC('opendir')
                                              000000    6097200
     3514+D  dirname                        *   VALUE options(*string)
                                              000000    6097300
     3515+
                                              000000    6097400
     3516+
   *--------------------------------------------------------------------
                                      000000    6097500
     3517+ * Get configurable path name variables
                                             000000    6097600
     3518+ *
                                              000000    6097700
     3519+ * long pathconf(const char *path, int name)
                                              000000    6097800
     3520+
   *--------------------------------------------------------------------
                                      000000    6097900
     3521+D pathconf        PR            10I 0 ExtProc('pathconf')
                                             000000    6098000
     3522+D   path                          *   Value options(*string)
                                              000000    6098100
     3523+D   name                        10I 0 Value
                                             000000    6098200
     3524+
                                              000000    6098300
     3525+
   *--------------------------------------------------------------------
                                      000000    6098400
     3526+ * Create interprocess channel
                                              000000    6098500
     3527+ *
                                              000000    6098600
     3528+ * int pipe(int fildes[2]);
                                             000000    6098700
     3529+
   *--------------------------------------------------------------------
                                      000000    6098800
     3530+ /if not defined(PIPE_PROTOTYPE)
                                              000000    6098900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   66
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3531+D pipe            PR            10I 0 ExtProc('pipe')
                                             000000    6099000
     3532+D   fildes                      10I 0 dim(2)
                                              000000    6099100
     3533+ /define PIPE_PROTOTYPE
                                             000000    6099200
     3534+ /endif
                                             000000    6099300
     3535+
                                              000000    6099400
     3536+
   *--------------------------------------------------------------------
                                      000000    6099500
     3537+ * Read from Descriptor with Offset
                                             000000    6099600
     3538+ *
                                              000000    6099700
     3539+ * ssize_t pread(int filedes, void *buf, size_t nbyte, off_t
   offset);                                     000000    6099800
     3540+
   *--------------------------------------------------------------------
                                      000000    6099900
     3541+ /if defined(*V5R2M0)
                                             000000    6100000
     3542+D pread           PR            10I 0 ExtProc('pread')
                                              000000    6100100
     3543+D   fildes                      10I 0 value
                                             000000    6100200
     3544+D   buf                           *   value
                                             000000    6100300
     3545+D   nbyte                       10U 0 value
                                             000000    6100400
     3546+D   offset                      10I 0 value
                                             000000    6100500
     3547+ /endif
                                             000000    6100600
     3548+
                                              000000    6100700
     3549+
   *--------------------------------------------------------------------
                                      000000    6100800
     3550+ * Read from Descriptor with Offset, Large File Enabled
                                             000000    6100900
     3551+ *
                                              000000    6101000
     3552+ * ssize_t pread64(int filedes, void *buf, size_t nbyte,
                                              000000    6101100
     3553+ *                 size_t nbyte, off64_t offset);
                                             000000    6101200
     3554+
   *--------------------------------------------------------------------
                                      000000    6101300
     3555+ /if defined(*V5R2M0)
                                             000000    6101400
     3556+D pread64         PR            10I 0 ExtProc('pread64')
                                              000000    6101500
     3557+D   fildes                      10I 0 value
                                             000000    6101600
     3558+D   buf                           *   value
                                             000000    6101700
     3559+D   nbyte                       10U 0 value
                                             000000    6101800
     3560+D   offset                      20I 0 value
                                             000000    6101900
     3561+ /endif
                                             000000    6102000
     3562+
                                              000000    6102100
     3563+
   *--------------------------------------------------------------------
                                      000000    6102200
     3564+ * Write to Descriptor with Offset
                                              000000    6102300
     3565+ *
                                              000000    6102400
     3566+ * ssize_t pwrite(int filedes, const void *buf,
                                             000000    6102500
     3567+ *                size_t nbyte, off_t offset);
                                              000000    6102600
     3568+
   *--------------------------------------------------------------------
                                      000000    6102700
     3569+ /if defined(*V5R2M0)
                                             000000    6102800
     3570+D pwrite          PR            10I 0 ExtProc('pwrite')
                                             000000    6102900
     3571+D   fildes                      10I 0 value
                                             000000    6103000
     3572+D   buf                           *   value
                                             000000    6103100
     3573+D   nbyte                       10U 0 value
                                             000000    6103200
     3574+D   offset                      10I 0 value
                                             000000    6103300
     3575+ /endif
                                             000000    6103400
     3576+
                                              000000    6103500
     3577+
   *--------------------------------------------------------------------
                                      000000    6103600
     3578+ * Write to Descriptor with Offset, Large File Enabled
                                              000000    6103700
     3579+ *
                                              000000    6103800
     3580+ * ssize_t pwrite64(int filedes, const void *buf,
                                             000000    6103900
     3581+ *                  size_t nbyte, off64_t offset);
                                              000000    6104000
     3582+
   *--------------------------------------------------------------------
                                      000000    6104100
     3583+ /if defined(*V5R2M0)
                                             000000    6104200
     3584+D pwrite64        PR            10I 0 ExtProc('pwrite64')
                                             000000    6104300
     3585+D   fildes                      10I 0 value
                                             000000    6104400
     3586+D   buf                           *   value
                                             000000    6104500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   67
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3587+D   nbyte                       10U 0 value
                                             000000    6104600
     3588+D   offset                      20I 0 value
                                             000000    6104700
     3589+ /endif
                                             000000    6104800
     3590+
                                              000000    6104900
     3591+
   *--------------------------------------------------------------------
                                      000000    6105000
     3592+ * Perform Miscellaneous file system functions
                                              000000    6105100
     3593+
   *--------------------------------------------------------------------
                                      000000    6105200
     3594+D QP0FPTOS        PR                  ExtPgm('QP0FPTOS')
                                              000000    6105300
     3595+D   Function                    32A   const
                                             000000    6105400
     3596+D   Exten1                       6A   const options(*nopass)
                                              000000    6105500
     3597+D   Exten2                       3A   const options(*nopass)
                                              000000    6105600
     3598+
                                              000000    6105700
     3599+
   *--------------------------------------------------------------------
                                      000000    6105800
     3600+ * Read From a File
                                             000000    6105900
     3601+ *
                                              000000    6106000
     3602+ * ssize_t read(int fildes, void *buffer, size_t bytes);
                                              000000    6106100
     3603+
   *--------------------------------------------------------------------
                                      000000    6106200
     3604+D read            PR            10I 0 ExtProc('read')
                                             000000    6106300
     3605+D  fildes                       10i 0 value
                                             000000    6106400
     3606+D  buf                            *   value
                                             000000    6106500
     3607+D  bytes                        10U 0 value
                                             000000    6106600
     3608+
                                              000000    6106700
     3609+
   *--------------------------------------------------------------------
                                      000000    6106800
     3610+ * Read Directory Entry
                                             000000    6106900
     3611+ *
                                              000000    6107000
     3612+ * struct dirent *readdir(DIR *dirp)
                                              000000    6107100
     3613+
   *--------------------------------------------------------------------
                                      000000    6107200
     3614+D readdir         PR              *   EXTPROC('readdir')
                                              000000    6107300
     3615+D  dirp                           *   VALUE
                                             000000    6107400
     3616+
                                              000000    6107500
     3617+
   *--------------------------------------------------------------------
                                      000000    6107600
     3618+ * Read Value of Symbolic Link
                                              000000    6107700
     3619+ *
                                              000000    6107800
     3620+ * int readlink(const char *path, char *buf, size_t bufsiz)
                                             000000    6107900
     3621+
   *--------------------------------------------------------------------
                                      000000    6108000
     3622+D readlink        PR            10I 0 ExtProc('readlink')
                                             000000    6108100
     3623+D   path                          *   value options(*string)
                                              000000    6108200
     3624+D   buf                           *   value
                                             000000    6108300
     3625+D   bufsiz                      10U 0 value
                                             000000    6108400
     3626+
                                              000000    6108500
     3627+
   *--------------------------------------------------------------------
                                      000000    6108600
     3628+ * Read From Descriptor using Multiple Buffers
                                              000000    6108700
     3629+ *
                                              000000    6108800
     3630+ * int readv(int fildes, struct iovec *io_vector[], int
   vector_len);                                      000000    6108900
     3631+
   *--------------------------------------------------------------------
                                      000000    6109000
     3632+D readv           PR            10I 0 ExtProc('readv')
                                              000000    6109100
     3633+D  fildes                       10i 0 value
                                             000000    6109200
     3634+D  io_vector                          like(iovec)
                                             000000    6109300
     3635+D                                     dim(256)
   options(*varsize)                                          000000
   6109400
     3636+D  vector_len                   10I 0 value
                                             000000    6109500
     3637+
                                              000000    6109600
     3638+
   *--------------------------------------------------------------------
                                      000000    6109700
     3639+ * Rename File or Directory
                                             000000    6109800
     3640+ *
                                              000000    6109900
     3641+ * int rename(const char *old, const char *new)
                                             000000    6110000
     3642+ *
                                              000000    6110100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   68
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3643+ *  Note: By defailt, if a file with the new name already
   exists,                                         000000    6110200
     3644+ *        rename will fail with an error.  If you define
                                              000000    6110300
     3645+ *        RENAMEUNLINK and a file with the new name already
   exists                                        000000    6110400
     3646+ *        it will be unlinked prior to renaming.
                                              000000    6110500
     3647+
   *--------------------------------------------------------------------
                                      000000    6110600
     3648+ /if defined(RENAMEUNLINK)
                                              000000    6110700
               LINES EXCLUDED: 3
     3649+ /else
                                              000000    6111100
     3650+D rename          PR            10I 0 ExtProc('Qp0lRenameKeep')
                                             000000    6111200
     3651+D   old                           *   Value options(*string)
                                              000000    6111300
     3652+D   new                           *   Value options(*string)
                                              000000    6111400
     3653+ /endif
                                             000000    6111500
     3654+
                                              000000    6111600
     3655+
   *--------------------------------------------------------------------
                                      000000    6111700
     3656+ * Reset Directory Stream to Beginning
                                              000000    6111800
     3657+ *
                                              000000    6111900
     3658+ * void rewinddir(DIR *dirp)
                                              000000    6112000
     3659+
   *--------------------------------------------------------------------
                                      000000    6112100
     3660+D rewinddir       PR                  ExtProc('rewinddir')
                                              000000    6112200
     3661+D   dirp                          *   value
                                             000000    6112300
     3662+
                                              000000    6112400
     3663+
                                              000000    6112500
     3664+
   *--------------------------------------------------------------------
                                      000000    6112600
     3665+ * Remove Directory
                                             000000    6112700
     3666+ *
                                              000000    6112800
     3667+ * int rmdir(const char *path)
                                              000000    6112900
     3668+
   *--------------------------------------------------------------------
                                      000000    6113000
     3669+D rmdir           PR            10I 0 ExtProc('rmdir')
                                              000000    6113100
     3670+D   path                          *   value options(*string)
                                              000000    6113200
     3671+
                                              000000    6113300
     3672+
   *--------------------------------------------------------------------
                                      000000    6113400
     3673+ * Get File Information
                                             000000    6113500
     3674+ *
                                              000000    6113600
     3675+ * int stat(const char *path, struct stat *buf)
                                             000000    6113700
     3676+
   *--------------------------------------------------------------------
                                      000000    6113800
     3677+D stat            PR            10I 0 ExtProc('stat')
                                             000000    6113900
     3678+D   path                          *   value options(*string)
                                              000000    6114000
     3679+D   buf                               likeds(statds)
                                              000000    6114100
     3680+
                                              000000    6114200
     3681+
                                              000000    6114300
     3682+
   *--------------------------------------------------------------------
                                      000000    6114400
     3683+ * Get File Information, Large File Enabled
                                             000000    6114500
     3684+ *
                                              000000    6114600
     3685+ * int stat(const char *path, struct stat64 *buf)
                                             000000    6114700
     3686+
   *--------------------------------------------------------------------
                                      000000    6114800
     3687+D stat64          PR            10I 0 ExtProc('stat64')
                                             000000    6114900
     3688+D   path                          *   value options(*string)
                                              000000    6115000
     3689+D   buf                               likeds(statds64)
                                              000000    6115100
     3690+
                                              000000    6115200
     3691+
                                              000000    6115300
     3692+
   *--------------------------------------------------------------------
                                      000000    6115400
     3693+ * statvfs() -- Get file system status
                                              000000    6115500
     3694+ *
                                              000000    6115600
     3695+ *    path = (input) pathname of a link ("file") in the IFS.
                                              000000    6115700
     3696+ *     buf = (output) data structure containing file system
   info                                          000000    6115800
     3697+ *
                                              000000    6115900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   69
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3698+ * Returns 0 if successful, -1 upon error.
                                              000000    6116000
     3699+ * (error information is returned via the "errno" variable)
                                             000000    6116100
     3700+
   *--------------------------------------------------------------------
                                      000000    6116200
     3701+D statvfs         PR            10I 0 ExtProc('statvfs64')
                                              000000    6116300
     3702+D   path                          *   value options(*string)
                                              000000    6116400
     3703+D   buf                               like(ds_statvfs)
                                              000000    6116500
     3704+
                                              000000    6116600
     3705+
   *--------------------------------------------------------------------
                                      000000    6116700
     3706+ * Make Symbolic Link
                                             000000    6116800
     3707+ *
                                              000000    6116900
     3708+ * int symlink(const char *pname, const char *slink)
                                              000000    6117000
     3709+
   *--------------------------------------------------------------------
                                      000000    6117100
     3710+D symlink         PR            10I 0 ExtProc('symlink')
                                              000000    6117200
     3711+D   pname                         *   value options(*string)
                                              000000    6117300
     3712+D   slink                         *   value options(*string)
                                              000000    6117400
     3713+
                                              000000    6117500
     3714+
   *--------------------------------------------------------------------
                                      000000    6117600
     3715+ * Get system configuration variables
                                             000000    6117700
     3716+ *
                                              000000    6117800
     3717+ * long sysconf(int name)
                                             000000    6117900
     3718+
   *--------------------------------------------------------------------
                                      000000    6118000
     3719+D sysconf         PR            10I 0 ExtProc('sysconf')
                                              000000    6118100
     3720+D   name                        10I 0 Value
                                             000000    6118200
     3721+
                                              000000    6118300
     3722+
   *--------------------------------------------------------------------
                                      000000    6118400
     3723+ * Set Authorization Mask for Job
                                             000000    6118500
     3724+ *
                                              000000    6118600
     3725+ * mode_t umask(mode_t cmask)
                                             000000    6118700
     3726+
   *--------------------------------------------------------------------
                                      000000    6118800
     3727+D umask           PR            10U 0 ExtProc('umask')
                                              000000    6118900
     3728+D   cmask                       10U 0 Value
                                             000000    6119000
     3729+
                                              000000    6119100
     3730+
   *--------------------------------------------------------------------
                                      000000    6119200
     3731+ * Remove Link to File.  (Deletes Directory Entry for File, and
   if                                        000000    6119300
     3732+ *    this was the last link to the file data, the file itself
   is                                         000000    6119400
     3733+ *    also deleted)
                                             000000    6119500
     3734+ *
                                              000000    6119600
     3735+ * int unlink(const char *path)
                                             000000    6119700
     3736+
   *--------------------------------------------------------------------
                                      000000    6119800
     3737+D unlink          PR            10I 0 ExtProc('unlink')
                                             000000    6119900
     3738+D   path                          *   Value options(*string)
                                              000000    6120000
     3739+
                                              000000    6120100
     3740+
   *--------------------------------------------------------------------
                                      000000    6120200
     3741+ * Set File Access & Modification Times
                                             000000    6120300
     3742+ *
                                              000000    6120400
     3743+ * int utime(const char *path, const struct utimbuf *times)
                                             000000    6120500
     3744+
   *--------------------------------------------------------------------
                                      000000    6120600
     3745+D utime           PR            10I 0 ExtProc('utime')
                                              000000    6120700
     3746+D   path                          *   value options(*string)
                                              000000    6120800
     3747+D   times                             likeds(utimbuf)
   options(*omit)                                      000000    6120900
     3748+
                                              000000    6121000
     3749+
   *--------------------------------------------------------------------
                                      000000    6121100
     3750+ * Write to a file
                                              000000    6121200
     3751+ *
                                              000000    6121300
     3752+ * ssize_t write(int fildes, const void *buf, size_t bytes)
                                             000000    6121400
     3753+
   *--------------------------------------------------------------------
                                      000000    6121500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   70
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3754+D write           PR            10I 0 ExtProc('write')
                                              000000    6121600
     3755+D  fildes                       10i 0 value
                                             000000    6121700
     3756+D  buf                            *   value
                                             000000    6121800
     3757+D  bytes                        10U 0 value
                                             000000    6121900
     3758+
                                              000000    6122000
     3759+
   *--------------------------------------------------------------------
                                      000000    6122100
     3760+ * Write to a file using (with type A field in prototype)
                                             000000    6122200
     3761+ *
                                              000000    6122300
     3762+ * ssize_t write(int fildes, const void *buf, size_t bytes)
                                             000000    6122400
     3763+
   *--------------------------------------------------------------------
                                      000000    6122500
     3764+D writeA          PR            10I 0 ExtProc('write')
                                              000000    6122600
     3765+D  fildes                       10i 0 value
                                             000000    6122700
     3766+D  buf                       65535A   const options(*varsize)
                                             000000    6122800
     3767+D  bytes                        10U 0 value
                                             000000    6122900
     3768+
                                              000000    6123000
     3769+
   *--------------------------------------------------------------------
                                      000000    6123100
     3770+ * Write to descriptor using multiple buffers
                                             000000    6123200
     3771+ *
                                              000000    6123300
     3772+ * int writev(int fildes, struct iovec *iovector[], int
   vector_len);                                      000000    6123400
     3773+
   *--------------------------------------------------------------------
                                      000000    6123500
     3774+D writev          PR            10I 0 ExtProc('writev')
                                             000000    6123600
     3775+D  fildes                       10i 0 value
                                             000000    6123700
     3776+D  io_vector                          like(iovec)
                                             000000    6123800
     3777+D                                     dim(256)
   options(*varsize)                                          000000
   6123900
     3778+D  vector_len                   10I 0 value
                                             000000    6124000
     3779  /copy QRPGLESRC,COMM_H
                                             000000     006900

   *---------------------------------------------------------------------
   -----------------------*
           * Nombre de miembro RPG  . . :  COMM_H
                                 *                     7
           * Nombre externo . . . . . . :  LIBHTTP/QRPGLESRC(COMM_H)
                                  *                     7
           * Ultimo cambio  . . . . . . :  05/02/08  15:29:06
                                 *                     7
           * Texto descriptivo  . . . . :  Generic Communications API
                                 *                     7

   *---------------------------------------------------------------------
   -----------------------*
     3780+/*-
                  +                          040726    7000100
     3781+ * Copyright (c) 2004-2008 Scott C. Klement
                  +                          080205    7000200
     3782+ * All rights reserved.
                  +                          040726    7000300
     3783+ *
                   +                          040726    7000400
     3784+ * Redistribution and use in source and binary forms, with or
   without          +                          040726    7000500
     3785+ * modification, are permitted provided that the following
   conditions          +                          040726    7000600
     3786+ * are met:
                  +                          040726    7000700
     3787+ * 1. Redistributions of source code must retain the above
   copyright           +                          040726    7000800
     3788+ *    notice, this list of conditions and the following
   disclaimer.            +                          040726    7000900
     3789+ * 2. Redistributions in binary form must reproduce the above
   copyright        +                          040726    7001000
     3790+ *    notice, this list of conditions and the following
   disclaimer in the      +                          040726    7001100
     3791+ *    documentation and/or other materials provided with the
   distribution.     +                          040726    7001200
     3792+ *
                   +                          040726    7001300
     3793+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS
   ''AS IS'' AND      +                          070828    7001400
     3794+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   LIMITED TO, THE       +                          040726    7001500
     3795+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
   PARTICULAR PURPOSE  +                          040726    7001600
     3796+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR
   CONTRIBUTORS BE LIABLE     +                          040726
   7001700
     3797+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   CONSEQUENTIAL  +                          040726    7001800
     3798+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   SUBSTITUTE GOODS     +                          040726    7001900
     3799+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   INTERRUPTION)       +                          040726    7002000
     3800+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   CONTRACT, STRICT  +                          040726    7002100
     3801+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   ARISING IN ANY WAY   +                          040726    7002200
     3802+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   POSSIBILITY OF      +                          040726    7002300
     3803+ * SUCH DAMAGE.
                  +                          040726    7002400
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   71
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3804+ */
                  +                          040726    7002500
     3805+
                                              040726    7002600
     3806+ *
                                              040726    7002700
     3807+ * Generic communications driver interface for HTTPAPI
                                              040726    7002800
     3808+ *
                                              040726    7002900
     3809+
                                              040726    7003000
     3810+ /if defined(COMM_H)
                                              040726    7003100
               LINES EXCLUDED: 1
     3811+ /endif
                                             040726    7003300
     3812+ /define COMM_H
                                             040726    7003400
     3813+
                                              040726    7003500
     3814+
   *-----------------------------------------------------------------
                                     040726    7003600
     3815+ *  commDriver:  Communications driver data structure
                                             040726    7003700
     3816+
   *-----------------------------------------------------------------
                                     040726    7003800
     3817+D p_CommDriver    s               *   inz(*NULL)
                                              040726    7003900
     3818+D commDriver      ds                  based(p_CommDriver)
                                             040726    7004000
     3819+D    p_CommResolve...
                                             040726    7004100
     3820+D                                 *   procptr
                                             040726    7004200
     3821+D    p_CommConnect...
                                             040726    7004300
     3822+D                                 *   procptr
                                             040726    7004400
     3823+D    p_CommUpgrade...
                                             070611    7004500
     3824+D                                 *   procptr
                                             070611    7004600
     3825+D    p_CommRead...
                                              040727    7004700
     3826+D                                 *   procptr
                                             040727    7004800
     3827+D    p_CommBlockRead...
                                             040726    7004900
     3828+D                                 *   procptr
                                             040726    7005000
     3829+D    p_CommBlockWrite...
                                              040726    7005100
     3830+D                                 *   procptr
                                             040726    7005200
     3831+D    p_CommLineRead...
                                              040726    7005300
     3832+D                                 *   procptr
                                             040726    7005400
     3833+D    p_CommLineWrite...
                                             040726    7005500
     3834+D                                 *   procptr
                                             040726    7005600
     3835+D    p_CommHangup...
                                              040726    7005700
     3836+D                                 *   procptr
                                             040726    7005800
     3837+D    p_CommCleanup...
                                             040726    7005900
     3838+D                                 *   procptr
                                             040726    7006000
     3839+
                                              040726    7006100
     3840+D p_commNew       s               *   procptr
                                             040726    7006200
     3841+D comm_New...
                                             040726    7006300
     3842+D                 PR              *   extproc(p_CommNew)
                                              040726    7006400
     3843+
                                              040726    7006500
     3844+D comm_Resolve...
                                             040726    7006600
     3845+D                 PR              *   extproc(p_CommResolve)
                                              040726    7006700
     3846+D   handle                        *   value
                                             040726    7006800
     3847+D   host                          *   value options(*string)
                                              040726    7006900
     3848+D   service                       *   value options(*string)
                                              040726    7007000
     3849+D   port                        10I 0 value
                                             040726    7007100
     3850+D   forced                       1N   const
                                             040726    7007200
     3851+
                                              040726    7007300
     3852+D comm_Connect...
                                             040726    7007400
     3853+D                 PR             1N   extproc(p_CommConnect)
                                              040726    7007500
     3854+D   handle                        *   value
                                             040726    7007600
     3855+D   AddrInfo                      *   value
                                             040726    7007700
     3856+D   timeout                     10P 3 value
                                             040727    7007800
     3857+
                                              070611    7007900
     3858+D comm_Upgrade...
                                             070611    7008000
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   72
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3859+D                 PR             1N   extproc(p_CommUpgrade)
                                              070611    7008100
     3860+D   handle                        *   value
                                             070611    7008200
     3861+D   timeout                     10P 3 value
                                             070611    7008300
     3862+
                                              040726    7008400
     3863+D comm_Read...
                                              040727    7008500
     3864+D                 PR            10I 0 extproc(p_CommRead)
                                             040727    7008600
     3865+D   handle                        *   value
                                             040726    7008700
     3866+D   buffer                        *   value
                                             040726    7008800
     3867+D   bufsize                     10I 0 value
                                             040726    7008900
     3868+D   timeout                     10P 3 value
                                             040727    7009000
     3869+
                                              040727    7009100
     3870+D comm_BlockRead...
                                             040727    7009200
     3871+D                 PR            10I 0 extproc(p_CommBlockRead)
                                              040727    7009300
     3872+D   handle                        *   value
                                             040727    7009400
     3873+D   buffer                        *   value
                                             040727    7009500
     3874+D   bufsize                     10I 0 value
                                             040727    7009600
     3875+D   timeout                     10P 3 value
                                             040727    7009700
     3876+
                                              040726    7009800
     3877+D comm_BlockWrite...
                                              040726    7009900
     3878+D                 PR            10I 0 extproc(p_CommBlockWrite)
                                             040726    7010000
     3879+D   handle                        *   value
                                             040726    7010100
     3880+D   buffer                        *   value
                                             040726    7010200
     3881+D   bufsize                     10I 0 value
                                             040726    7010300
     3882+D   timeout                     10P 3 value
                                             040727    7010400
     3883+
                                              040726    7010500
     3884+D comm_LineRead...
                                              040726    7010600
     3885+D                 PR            10I 0 extproc(p_CommLineRead)
                                             040726    7010700
     3886+D   handle                        *   value
                                             040726    7010800
     3887+D   buffer                        *   value
                                             040726    7010900
     3888+D   bufsize                     10I 0 value
                                             040726    7011000
     3889+D   timeout                     10P 3 value
                                             040727    7011100
     3890+
                                              040726    7011200
     3891+D comm_LineWrite...
                                             040726    7011300
     3892+D                 PR            10I 0 extproc(p_CommLineRead)
                                             040726    7011400
     3893+D   handle                        *   value
                                             040726    7011500
     3894+D   buffer                        *   value
                                             040726    7011600
     3895+D   bufsize                     10I 0 value
                                             040726    7011700
     3896+D   timeout                     10P 3 value
                                             040727    7011800
     3897+
                                              040726    7011900
     3898+D comm_Hangup...
                                              040726    7012000
     3899+D                 PR             1N   extproc(p_CommHangup)
                                             040726    7012100
     3900+D   handle                        *   value
                                             040726    7012200
     3901+
                                              040726    7012300
     3902+D comm_Cleanup...
                                             040726    7012400
     3903+D                 PR             1N   extproc(p_CommCleanup)
                                              040726    7012500
     3904+D   handle                        *   value
                                             040726    7012600
     3905
                                             000000     007000
     3906  /if defined(HTTP_USE_CCSID)
                                              000000     007100
     3907 D CCSID_OR_CP     S             10I 0 inz(O_CCSID)
                                              000000     007200
     3908  /else
                                              000000     007300
               LINES EXCLUDED: 1
     3909  /endif
                                             000000     007500
     3910
                                             000000     007600
     3911  ***  Local procedures ***
                                              000000     007700
     3912
                                             000000     007800
     3913 D do_get          PR            10I 0
                                             000000     007900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   73
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3914 D  peSaveProc                     *   value procptr
                                             000000     008000
     3915 D  peComm                         *   value
                                             000000     008100
     3916 D  peFile                       10I 0 value
                                             000000     008200
     3917 D  peTimeout                    10I 0 value
                                             000000     008300
     3918 D  peAbsPath                 32767A   varying const
   options(*varsize)                                     000000
   008400
     3919 D  peHost                      256A   const
                                             000000     008500
     3920 D  peModTime                      Z   options(*omit)
                                              000000     008600
     3921 D  peUserAgent                  64A   options(*omit)
                                              000000     008700
     3922 D  peContentType                64A   options(*omit)
                                              000000     008800
     3923 D  peSoapAction                 64A   options(*omit)
                                              000000     008900
     3924 D  pePort                       10I 0 value
                                             000000     009000
     3925 D  peSecure                      1N   value
                                             000000     009100
     3926 D  peServ                       32A   const
                                             000000     009200
     3927
                                             000000     009300
     3928 D do_post         PR            10I 0
                                             000000     009400
     3929 D  peSaveProc                     *   value procptr
                                             000000     009500
     3930 D  peSendProc                     *   value procptr
                                             000000     009600
     3931 D  pePostData                     *   value
                                             000000     009700
     3932 D  pePostDataLen                10I 0 value
                                             000000     009800
     3933 D  peComm                         *   value
                                             000000     009900
     3934 D  peFile                       10I 0 value
                                             000000     010000
     3935 D  peTimeout                    10I 0 value
                                             000000     010100
     3936 D  peAbsPath                 32767A   const varying
   options(*varsize)                                     000000
   010200
     3937 D  peHost                      256A   const
                                             000000     010300
     3938 D  peUserAgent                  64A   options(*omit)
                                              000000     010400
     3939 D  peContentType                64A   options(*omit)
                                              000000     010500
     3940 D  peSoapAction                 64A   options(*omit)
                                              000000     010600
     3941 D  pePostProc                     *   value procptr
                                             000000     010700
     3942 D  pePostFD                     10I 0 value
                                             000000     010800
     3943 D  pePort                       10I 0 value
                                             000000     010900
     3944 D  peSecure                      1N   value
                                             000000     011000
     3945 D  peServ                       32A   const
                                             000000     011100
     3946
                                             000000     011200
     3947 D SendReq         PR            10I 0
                                             000000     011300
     3948 D   peComm                        *   value
                                             000000     011400
     3949 D   peData                        *   value
                                             000000     011500
     3950 D   peDataLen                   10I 0 value
                                             000000     011600
     3951 D   peTimeout                   10I 0 value
                                             000000     011700
     3952
                                             000000     011800
     3953 D recvresp        PR            10I 0
                                             000000     011900
     3954 D   peComm                        *   value
                                             000000     012000
     3955 D   peRespChain              32767A   varying options(*varsize)
                                             000000     012100
     3956 D   peRespLen                   10I 0 value
                                             000000     012200
     3957 D   peTimeOut                   10P 3 value
                                             000000     012300
     3958 D   peUse100                     1N   const
                                             000000     012400
     3959
                                             000000     012500
     3960 D recvdoc         PR            10I 0
                                             000000     012600
     3961 D   peComm                        *   value
                                             000000     012700
     3962 D   peProcedure                   *   value procptr
                                             000000     012800
     3963 D   peFD                        10I 0 value
                                             000000     012900
     3964 D   peTimeout                   10I 0 value
                                             000000     013000
     3965 D   peCLen                      10U 0 value
                                             000000     013100
     3966 D   peUseCL                      1N   const
                                             000000     013200
     3967
                                             000000     013300
     3968 D recvchunk       PR            10I 0
                                             000000     013400
     3969 D   peComm                        *   value
                                             000000     013500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   74
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     3970 D   peProcedure                   *   value procptr
                                             000000     013600
     3971 D   peFD                        10I 0 value
                                             000000     013700
     3972 D   peTimeout                   10I 0 value
                                             000000     013800
     3973
                                             000000     013900
     3974 D SendDoc         PR            10I 0
                                             000000     014000
     3975 D  peComm                         *   value
                                             000000     014100
     3976 D  pePostData                     *   value
                                             000000     014200
     3977 D  pePostDataLen                10I 0 value
                                             000000     014300
     3978 D  peTimeout                    10I 0 value
                                             000000     014400
     3979 D  peUnused1                      *   value procptr
                                             000000     014500
     3980 D  peUnused2                    10I 0 value
                                             000000     014600
     3981
                                             000000     014700
     3982 D SendRaw         PR            10I 0
                                             000000     014800
     3983 D  peComm                         *   value
                                             000000     014900
     3984 D  peUnused1                      *   value
                                             000000     015000
     3985 D  peDataSize                   10I 0 value
                                             000000     015100
     3986 D  peTimeout                    10I 0 value
                                             000000     015200
     3987 D  pePostProc                     *   value procptr
                                             000000     015300
     3988 D  pePostFD                     10I 0 value
                                             000000     015400
     3989
                                             000000     015500
     3990 d get_chunk_size  PR            10I 0
                                             000000     015600
     3991 d   peComm                        *   value
                                             000000     015700
     3992 d   peTimeout                   10I 0 value
                                             000000     015800
     3993
                                             000000     015900
     3994 D interpret_auth  PR
                                              000000     016000
     3995 D   peRespChain               2048A   const
                                             000000     016100
     3996 D   peKwdPos                    10I 0 value
                                             000000     016200
     3997
                                             000000     016300
     3998 D interpret_proxy_auth...
                                             000000     016400
     3999 D                 PR
                                              000000     016500
     4000 D   peRespChain               2048A   const
                                             000000     016600
     4001 D   peKwdPos                    10I 0 value
                                             000000     016700
     4002
                                             000000     016800
     4003 D mkdigest        PR         32767A   varying
                                             000000     016900
     4004 D   peMethod                     4A   const
                                             000000     017000
     4005 D   peURI                    32767A   varying const
   options(*varsize)                                     000000
   017100
     4006
                                             000000     017200
     4007 D parse_resp_chain...
                                             000000     017300
     4008 D                 PR            10I 0
                                             000000     017400
     4009 D  peRespChain               32767A   varying const
                                             000000     017500
     4010 D  peRC                         10I 0
                                             000000     017600
     4011 D  peTE                         32A
                                             000000     017700
     4012 D  peCLen                       10u 0
                                             000000     017800
     4013 D  peUseCL                       1N
                                             000000     017900
     4014 D  peAuthErr                     1N
                                             000000     018000
     4015 D  peProxyAuthErr...
                                              000000     018100
     4016 D                                1N
                                             000000     018200
     4017 D  peHost                      256A   varying const
                                             000000     018300
     4018 D  pePath                      256A   varying const
                                             000000     018400
     4019
                                             000000     018500
     4020 D setUrlAuth      PR
                                              000000     018600
     4021 D   peUsername                  80A   const
                                             000000     018700
     4022 D   pePasswd                  1024A   const
                                             000000     018800
     4023
                                             000000     018900
     4024 D upload_sts      PR                  ExtProc(wkUplProc)
                                              000000     019000
     4025 D   peBytesSent                 10U 0 value
                                             000000     019100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   75
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4026 D   peBytesTot                  10U 0 value
                                             000000     019200
     4027 D   peUserData                    *   value
                                             000000     019300
     4028
                                             000000     019400
     4029 D download_sts    PR                  ExtProc(wkDwnlProc)
                                             000000     019500
     4030 D   peBytesSent                 10U 0 value
                                             000000     019600
     4031 D   peBytesTot                  10U 0 value
                                             000000     019700
     4032 D   peUserData                    *   value
                                             000000     019800
     4033
                                             000000     019900
     4034 D addl_headers    PR                  ExtProc(wkAddHdrProc)
                                             000000     020000
     4035 D   peAddlHdrs                1024A   varying
                                             000000     020100
     4036 D   peUserData                    *   value
                                             000000     020200
     4037
                                             000000     020300
     4038 D parse_hdrs      PR                  ExtProc(wkParseHdrProc)
                                             000000     020400
     4039 D   peHdrData                 2048A   const
                                             000000     020500
     4040 D   peUserData                    *   value
                                             000000     020600
     4041
                                             000000     020700
     4042 D parse_hdr_long  PR                  ExtProc(wkParseHdrLong)
                                             000000     020800
     4043 D   peHdrData                32767A   const varying
                                             000000     020900
     4044 D   peUserData                    *   value
                                             000000     021000
     4045
                                             070611     021100
     4046 D proxy_tunnel    PR            10I 0
                                             070611     021200
     4047 D   peComm                        *   value
                                             070611     021300
     4048 D   peServ                      32a   const
                                             070611     021400
     4049 D   peHost                     256a   const
                                             070611     021500
     4050 D   pePort                      10i 0 value
                                             070611     021600
     4051 D   peTimeout                   10i 0 value
                                             070611     021700
     4052
                                             000000     021800
     4053
                                             000000     021900
     4054  ***  Global Constants  ***
                                             000000     022000
     4055
                                             000000     022100
     4056 D CRLF            C                   CONST(x'0d25')
                                              000000     022200
     4057 D upper           C
   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
   000000     022300
     4058 D lower           C
   'abcdefghijklmnopqrstuvwxyz'
   000000     022400
     4059
                                             000000     022500
     4060  ***  Global Variables  ***
                                             000000     022600
     4061
                                             000000     022700
     4062 D wkRedirLoc      s           1024A   varying inz('')
                                             000000     022800
     4063
                                             000000     022900
     4064 D dsAuth          DS
                                              000000     023000
     4065 D   dsAuthType                   1A   inz(HTTP_AUTH_NONE)
                                             000000     023100
     4066 D   dsAuthBasic                  1N   inz(*OFF)
                                             000000     023200
     4067 D   dsAuthDigest                 1N   inz(*OFF)
                                             000000     023300
     4068 D   dsAuthRealm                124A
                                             000000     023400
     4069 D   dsAuthNonce                128A
                                             000000     023500
     4070 D   dsAuthOpaque               128A
                                             000000     023600
     4071 D   dsAuthQOP                   32A
                                             000000     023700
     4072 D   dsAuthCnonce                16A
                                             000000     023800
     4073 D   dsAuthNC                     7P 0 inz(0)
                                              000000     023900
     4074 D   dsAuthUser                  80A
                                             000000     024000
     4075 D   dsAuthPasswd              1024A
                                             000000     024100
     4076 D   dsAuthStr                 1476A   varying inz('')
                                             000000     024200
     4077
                                             000000     024300
     4078 D dsProxyAuth     DS
                                              000000     024400
     4079 D   dsProxyAuthType...
                                              000000     024500
     4080 D                                1A   inz(HTTP_AUTH_NONE)
                                             000000     024600
     4081 D   dsProxyAuthBasic...
                                             000000     024700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   76
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4082 D                                1N   inz(*OFF)
                                             000000     024800
     4083 D   dsProxyAuthRealm...
                                             000000     024900
     4084 D                              124A
                                             000000     025000
     4085 D   dsProxyAuthUser...
                                              000000     025100
     4086 D                               80A
                                             000000     025200
     4087 D   dsProxyAuthPasswd...
                                              000000     025300
     4088 D                             1024A
                                             000000     025400
     4089 D   dsProxyAuthStr...
                                             000000     025500
     4090 D                             1476A   varying inz('')
                                             000000     025600
     4091
                                             000000     025700
     4092 D dsProxy         DS
                                              070611     025800
     4093 D   dsProxyHost               2048A   inz(*blanks)
                                              070216     025900
     4094 D   dsProxyPort                 10I 0 inz(*zeros)
                                             070216     026000
     4095 D   dsProxyTun                   1N   inz(*off)
                                             070611     026100
     4096
                                             000000     026200
     4097 D wkSaveAuth      s                   like(dsAuth)
                                              000000     026300
     4098
                                             000000     026400
     4099 D wkUplProc       S               *   procptr inz(*NULL)
                                              000000     026500
     4100 D wkUplUdata      S               *   inz(*NULL)
                                              000000     026600
     4101 D wkDwnlProc      S               *   procptr inz(*NULL)
                                              000000     026700
     4102 D wkDwnlUdata     S               *   inz(*NULL)
                                              000000     026800
     4103 D wkAddHdrProc    S               *   procptr inz(*NULL)
                                              000000     026900
     4104 D wkAddHdrData    S               *   inz(*NULL)
                                              000000     027000
     4105 D wkParseHdrProc  S               *   procptr inz(*NULL)
                                              000000     027100
     4106 D wkParseHdrData  S               *   inz(*NULL)
                                              000000     027200
     4107 D wkParseHdrLong  S               *   procptr inz(*NULL)
                                              000000     027300
     4108 D wkParseHdrLongData...
                                             000000     027400
     4109 D                 S               *   inz(*NULL)
                                              000000     027500
     4110
                                             000000     027600
     4111 D wk100time       S             10P 3 inz(0.5)
                                              000000     027700
     4112 D use_cookies     S              1N   inz(HTTP_COOKIE_DEFAULT)
                                              000000     027800
     4113
                                             000000     027900
     4114
                                             000000     028000
     4115
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     028100
     4116  *  Close HTTP connection
                                             000000     028200
     4117
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     028300
     4118 P http_close      B                   export
                                              000000     028400
     4119 D http_close      PI            10I 0
                                             000000     028500
     4120 D  peSock                       10I 0 value
                                             000000     028600
     4121 D  peComm                         *   value
                                             000000     028700
     4122
                                             000000     028800
     4123 c                   callp     debug_msg('http_close():
   entered')                                          000000     028900
     4124
                                             000000     029000
     4125 c                   if        %parms < 2
                                    B01       000000     029100
     4126 c                   callp     SetError(HTTP_NOTSUPP
                                    01       000000     029200
     4127 c                                     : ' using old format of '
                                    01       000000     029300
     4128 c                                     + 'http_close')
                                    01       000000     029400
     4129 c                   return    -1
                                     01       000000     029500
     4130 c                   endif
                                   E01       000000     029600
     4131
                                             000000     029700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   77
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4132 c                   callp     debug_close
                                             000000     029800
     4133
                                             000000     029900
     4134 c                   if        comm_hangup ( peComm )
                                    B01       000000     030000
     4135 c                   return    0
                                    01       000000     030100
     4136 c                   else
                                    X01       000000     030200
     4137 c                   return    -1
                                     01       000000     030300
     4138 c                   endif
                                   E01       000000     030400
     4139 P                 E
                                             000000     030500
     4140
                                             000000     030600
     4141
                                             000000     030700
     4142
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     030800
     4143  *  HTTP GET command:   This performs the logic of an HTTP GET.
                                             000000     030900
     4144  *
                                              000000     031000
     4145  *
                                              000000     031100
     4146  *          peSaveProc = procedure to use for saving received
   data                                        000000     031200
     4147  *              peSock = pointer to socket
   descriptor/handle/structure                                    000000
       031300
     4148  *              peFile = file descriptor/handle/structure
                                             000000     031400
     4149  *           peTimeout = timeout in seconds.  If no data could
   be                                         000000     031500
     4150  *                  sent or received in this time period,
   procedure                                       000000     031600
     4151  *                  will return 0.
                                              000000     031700
     4152  *
                                              000000     031800
     4153  *           peAbsPath = absolute path to document on host.
                                             000000     031900
     4154  *              peHost = host to receive document from
                                              000000     032000
     4155  *           peModTime = (optional) Only download document if
   it's                                        000000     032100
     4156  *                  modification time is newer than this
   timestamp.                                       000000     032200
     4157  *                  If omitted, the document will always be
   retrieved                                     000000     032300
     4158  *         peUserAgent = (optional) User-Agent string to report
   to                                        000000     032400
     4159  *                  server.  If blank, no string is sent.  If
   omitted,                                    000000     032500
     4160  *                  'http-api/1.0' will be sent.
                                              000000     032600
     4161  *        peConentType = (optional) Content-type reported to
   CGI                                          000000     032700
     4162  *                  scripts.  If omitted or blank, none will be
   sent.                                     000000     032800
     4163  *
                                              000000     032900
     4164  *   returns:     HTTP response code.
                                             000000     033000
     4165  *             or 0 upon timeout
                                              000000     033100
     4166  *             or -1 upon internal error (check HTTP_ERROR)
                                             000000     033200
     4167
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     033300
     4168 P do_get          B
                                             000000     033400
     4169 D do_get          PI            10I 0
                                             000000     033500
     4170 D  peSaveProc                     *   value procptr
                                             000000     033600
     4171 D  peComm                         *   value
                                             000000     033700
     4172 D  peFile                       10I 0 value
                                             000000     033800
     4173 D  peTimeout                    10I 0 value
                                             000000     033900
     4174 D  peAbsPath                 32767A   varying const
   options(*varsize)                                     000000
   034000
     4175 D  peHost                      256A   const
                                             000000     034100
     4176 D  peModTime                      Z   options(*omit)
                                              000000     034200
     4177 D  peUserAgent                  64A   options(*omit)
                                              000000     034300
     4178 D  peContentType                64A   options(*omit)
                                              000000     034400
     4179 D  peSoapAction                 64A   options(*omit)
                                              000000     034500
     4180 D  pePort                       10I 0 value
                                             000000     034600
     4181 D  peSecure                      1N   value
                                             000000     034700
     4182 D  peServ                       32A   const
                                             000000     034800
     4183
                                             000000     034900
     4184 D wwReqChain      S          32767A   varying
                                             000000     035000
     4185 D wwAddlHdr       s           1024A   varying
                                             000000     035100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   78
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4186 D wwRespChain     s          32767A   varying
                                             070611     035200
     4187 D wwModString     S             29A
                                             000000     035300
     4188 D rc              S             10I 0
                                             000000     035400
     4189 D wwTE            S             32A
                                             000000     035500
     4190 D wwAuthErr       S              1N   inz(*OFF)
                                             000000     035600
     4191 D wwProxyAuthErr...
                                             000000     035700
     4192 D                 S              1N   inz(*OFF)
                                             000000     035800
     4193 D wwClen          s             10U 0
                                             000000     035900
     4194 D wwUseCL         s              1N
                                             000000     036000
     4195 D wwFinRC         S             10I 0
                                             000000     036100
     4196 D wwErrorNo       s             10I 0
                                             000000     036200
     4197 D wwErrorMsg      s                   like(http_error)
                                              000000     036300
     4198 d wwPathPfx       s           1024A   varying
                                             000000     036400
     4199
                                             000000     036500
     4200 c                   callp     debug_msg('do_get(): entered')
                                              000000     036600
     4201
                                             000000     036700
     4202 C*********************************************************
                                              000000     036800
     4203 C*  Build an HTTP/1.1 request chain:
                                              000000     036900
     4204 C*********************************************************
                                              000000     037000
     4205 c
                                             000000     037100
     4206 c* If Connection is done via Proxy, an URI instead of just the
   path has to be sent.                       000000     037200
     4207 c                   if        dsProxyHost <> *blanks
                                    B01       000000     037300
     4208 c                               and dsProxyTun = *Off
                                   B01       070611     037400
     4209 c                   eval      wwPathPfx = %trim(peServ) + '://'
   +                                01       000000     037500
     4210 c                             %trim(peHost)
                                    01       000000     037600
     4211 c                   if        pePort <> 0
                                   B02       000000     037700
     4212 c                   eval      wwPathPfx = wwPathPfx + ':' +
                                    02       000000     037800
     4213 c
   %trim(%editc(pePort:'L'))                               02
   000000     037900
     4214 c                   endif
                                   E02       000000     038000
     4215 c                   else
                                    X01       000000     038100
     4216 c                   eval      wwPathPfx = ''
                                     01       000000     038200
     4217 c                   endif
                                   E01       000000     038300
     4218 c
                                   E01       000000     038400
     4219 c                   eval      wwReqChain =
                                              000000     038500
     4220 c                             'GET ' +
   wwPathPfx+%trim(peAbsPath) +
   000000     038600
     4221 c                                    ' HTTP/1.1'+CRLF+
                                              000000     038700
     4222 c                             'Host: '+%trim(peHost)
                                              000000     038800
     4223
                                             000000     038900
     4224 c                   if        pePort = 0
                                    B01       000000     039000
     4225 c                   eval      wwReqChain = wwReqChain + CRLF
                                     01       000000     039100
     4226 c                   else
                                    X01       000000     039200
     4227 c                   eval      wwReqChain = wwReqChain + ':'
                                    01       000000     039300
     4228 c                                        +
   %trim(%editc(pePort:'L'))                             01       000000
       039400
     4229 c                                        + CRLF
                                    01       000000     039500
     4230 c                   endif
                                   E01       000000     039600
     4231
                                             000000     039700
     4232 c                   if        dsProxyAuthType = HTTP_AUTH_BASIC
                                   B01       000000     039800
     4233 c                                and dsProxyTun = *off
                                    B01       070611     039900
     4234 c                   eval      wwReqChain = wwReqChain +
                                    01       000000     040000
     4235 c                             'Proxy-Authorization: Basic '+
                                     01       000000     040100
     4236 c                             dsProxyAuthStr + CRLF
                                    01       000000     040200
     4237 c                   endif
                                   E01       000000     040300
     4238
                                             000000     040400
     4239 c                   select
                                    B01       000000     040500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   79
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4240 c                   when      dsAuthType = HTTP_AUTH_BASIC
                                    X01       000000     040600
     4241 c                   eval      wwReqChain = wwReqChain +
                                    01       000000     040700
     4242 c                             'Authorization: Basic ' +
                                    01       000000     040800
     4243 c                              dsAuthStr + CRLF
                                    01       000000     040900
     4244 c                   when      dsAuthType = HTTP_AUTH_MD5_DIGEST
                                   X01       000000     041000
     4245 c                   eval      wwReqChain = wwReqChain +
                                    01       000000     041100
     4246 c                             'Authorization: Digest ' +
                                     01       000000     041200
     4247 c                             mkdigest('GET':peAbsPath) + CRLF
                                     01       000000     041300
     4248 c                   endsl
                                   E01       000000     041400
     4249
                                             000000     041500
     4250 c                   if        %addr(peModTime) <> *NULL
                                   B01       000000     041600
     4251 c                   eval      wwModString = httpdate(peModTime)
                                    01       000000     041700
     4252 c                   eval      wwReqChain = wwReqChain +
                                    01       000000     041800
     4253 c                             'If-Modified-Since:
   '+wwModString+CRLF                             01       000000
   041900
     4254 c                   endif
                                   E01       000000     042000
     4255
                                             000000     042100
     4256 c                   if        %addr(peUserAgent)<>*NULL
                                   B01       000000     042200
     4257 c                   if        peUserAgent <> *blanks
                                    B02       000000     042300
     4258 c                   eval      wwReqChain = wwReqChain +
                                    02       000000     042400
     4259 c                             'User-Agent:
   '+%trimr(peUserAgent)+CRLF                            02       000000
       042500
     4260 c                   endif
                                   E02       000000     042600
     4261 c                   else
                                    X01       000000     042700
     4262 c                   eval      wwReqChain = wwReqChain +
                                    01       000000     042800
     4263 c                             'User-Agent: ' + HTTP_USERAGENT +
   CRLF                             01       000000     042900
     4264 c                   endif
                                   E01       000000     043000
     4265
                                             000000     043100
     4266 c                   if        %addr(peContentType) <> *NULL
                                   B01       000000     043200
     4267 c                   if        peContentType <> *blanks
                                    B02       000000     043300
     4268 c                   eval      wwReqChain = wwReqChain +
                                    02       000000     043400
     4269 c                             'Content-Type:
   '+%trimr(peContentType)+                            02       000000
     043500
     4270 c                             CRLF
                                     02       000000     043600
     4271 c                   endif
                                   E02       000000     043700
     4272 c                   endif
                                   E01       000000     043800
     4273
                                             000000     043900
     4274 c                   if        %addr(peSOAPAction) <> *NULL
                                    B01       000000     044000
     4275 c                   if        peSOAPAction <> *blanks
                                   B02       000000     044100
     4276 c                   eval      wwReqChain = wwReqChain +
                                    02       000000     044200
     4277 c                             'SOAPAction: '
   +%trimr(peSOAPAction)+                              02       000000
     044300
     4278 c                             CRLF
                                     02       000000     044400
     4279 c                   else
                                    X02       000000     044500
     4280 c                   eval      wwReqChain = wwReqChain +
                                    02       000000     044600
     4281 c                             'SOAPAction:  ' + CRLF
                                     02       000000     044700
     4282 c                   endif
                                   E02       000000     044800
     4283 c                   endif
                                   E01       000000     044900
     4284
                                             000000     045000
     4285 c                   if        use_cookies = *ON
                                   B01       000000     045100
     4286 c                   eval      wwReqChain = wwReqChain +
                                    01       000000     045200
     4287 c                             header_get_req_cookies(
   %trim(peHost)                              01       000000     045300
     4288 c                                                   :
   %trim(peAbsPath)                           01       000000     045400
     4289 c                                                   : peSecure
   )                                 01       000000     045500
     4290 c                   endif
                                   E01       000000     045600
     4291
                                             000000     045700
     4292 c                   if        wkAddHdrProc <> *NULL
                                   B01       000000     045800
     4293 c                   callp     addl_headers(wwAddlHdr:
   wkAddHdrData)                              01       000000     045900
     4294 c                   eval      wwReqChain = wwReqChain +
   wwAddlHdr                                01       000000     046000
     4295 c                   endif
                                   E01       000000     046100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   80
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4296
                                             000000     046200
     4297 c                   eval      wwReqChain = wwReqChain + CRLF
                                              000000     046300
     4298 C*********************************************************
                                              000000     046400
     4299 C*  Send request chain & receive the response chain
                                             000000     046500
     4300 C*********************************************************
                                              000000     046600
     4301 c                   eval      rc = SendReq( peComm
                                              070611     046700
     4302 c                                         : %addr(wwReqChain)+2
                                             000000     046800
     4303 c                                         : %len(wwReqChain)
                                              000000     046900
     4304 c                                         : peTimeout )
                                             000000     047000
     4305 c                   if        rc < 1
                                    B01       000000     047100
     4306 c                   return    rc
                                     01       000000     047200
     4307 c                   endif
                                   E01       000000     047300
     4308
                                             000000     047400
     4309 c                   eval      rc = RecvResp( peComm
                                             070611     047500
     4310 c                                          : wwRespChain
                                              070611     047600
     4311 c                                          : %size(wwRespChain)
                                             070611     047700
     4312 c                                          : peTimeout
                                              070611     047800
     4313 c                                          : *OFF )
                                             070611     047900
     4314 c                   if        rc < 1
                                    B01       000000     048000
     4315 c                   return    rc
                                     01       000000     048100
     4316 c                   endif
                                   E01       000000     048200
     4317
                                             000000     048300
     4318 C*********************************************************
                                              000000     048400
     4319 C*  Interpret the response chain:
                                             000000     048500
     4320 C*********************************************************
                                              000000     048600
     4321 c                   eval      rc = parse_resp_chain(
   wwRespChain                                          000000     048700
     4322 c                                                  : rc
                                             000000     048800
     4323 c                                                  : wwTE
                                             000000     048900
     4324 c                                                  : wwCLen
                                             000000     049000
     4325 c                                                  : wwUseCL
                                              000000     049100
     4326 c                                                  : wwAuthErr
                                              000000     049200
     4327 c                                                  :
   wwProxyAuthErr                                       000000     049300
     4328 c                                                  :
   %trim(peHost)                                        000000     049400
     4329 c                                                  :
   %trim(peAbsPath))                                    000000     049500
     4330
                                             000000     049600
     4331 c                   if        rc<=100 or rc=204 or rc=304
                                   B01       000000     049700
     4332 c                   return    rc
                                     01       000000     049800
     4333 c                   endif
                                   E01       000000     049900
     4334
                                             000000     050000
     4335 c                   eval      wwFinRC = rc
                                              000000     050100
     4336 c                   eval      wwErrorMsg =
   http_error(wwErrorNo)                                          000000
       050200
     4337
                                             000000     050300
     4338 C*********************************************************
                                              000000     050400
     4339 C* receive the document
                                             000000     050500
     4340 C*********************************************************
                                              000000     050600
     4341 c                   if        %scan('chunked': wwTE) > 0
                                    B01       000000     050700
     4342 c                   eval      rc = RecvChunk(peComm:
   peSaveProc:                                 01       070611     050800
     4343 c                                    peFile: peTimeout)
                                    01       000000     050900
     4344 c                   else
                                    X01       000000     051000
     4345 c                   eval      rc = RecvDoc(peComm: peSaveProc:
                                     01       070611     051100
     4346 c                                    peFile: peTimeout: wwCLen:
                                    01       000000     051200
     4347 c                                    wwUseCL)
                                    01       000000     051300
     4348 c                   endif
                                   E01       000000     051400
     4349
                                             000000     051500
     4350 c                   if        rc<1  or wwFinRC=200
                                    B01       000000     051600
     4351 c                   return    rc
                                     01       000000     051700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   81
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4352 c                   else
                                    X01       000000     051800
     4353 c                   callp     SetError(wwErrorNo: wwErrorMsg)
                                    01       000000     051900
     4354 c                   return    wwFinRC
                                    01       000000     052000
     4355 c                   endif
                                   E01       000000     052100
     4356 P                 E
                                             000000     052200
     4357
                                             000000     052300
     4358
                                             000000     052400
     4359
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     052500
     4360  *  HTTP POST command:   This performs the logic of an HTTP
   POST.                                         000000     052600
     4361  *
                                              000000     052700
     4362  *          peSaveProc = procedure to use for saving received
   data                                        000000     052800
     4363  *          peSendProc = procedure to use for sending a doc
   body.                                         000000     052900
     4364  *
                                              000000     053000
     4365  *          pePostData = data to send to receiving CGI script
                                             000000     053100
     4366  *                (can be a pointer to a string or a user
   space, or                                       000000     053200
     4367  *                randomly allocated memory.)
                                             000000     053300
     4368  *       pePostDataLen = length of post data
                                              000000     053400
     4369  *
                                              000000     053500
     4370  *              peSock = pointer to socket
   descriptor/handle/structure                                    000000
       053600
     4371  *              peFile = file descriptor/handle/structure
                                             000000     053700
     4372  *
                                              000000     053800
     4373  *           peTimeout = timeout in seconds.  If no data could
   be                                         000000     053900
     4374  *                  sent or received in this time period,
   procedure                                       000000     054000
     4375  *                  will return 0.
                                              000000     054100
     4376  *
                                              000000     054200
     4377  *           peAbsPath = absolute path to document on host.
                                             000000     054300
     4378  *              peHost = host to receive document from
                                              000000     054400
     4379  *         peUserAgent = (optional) User-Agent string to report
   to                                        000000     054500
     4380  *                  server.  If blank, no string is sent.  If
   omitted,                                    000000     054600
     4381  *                  'http-api/1.0' will be sent.
                                              000000     054700
     4382  *       peContentType = (optional) Content-type reported to
   CGI                                          000000     054800
     4383  *                  scripts.  If omitted or blank, none will be
   sent.                                     000000     054900
     4384  *
                                              000000     055000
     4385  *   returns:     HTTP response code.
                                             000000     055100
     4386  *             or 0 upon timeout
                                              000000     055200
     4387  *             or -1 upon internal error (check HTTP_ERROR)
                                             000000     055300
     4388
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     055400
     4389 P do_post         B
                                             000000     055500
     4390 D do_post         PI            10I 0
                                             000000     055600
     4391 D  peSaveProc                     *   value procptr
                                             000000     055700
     4392 D  peSendProc                     *   value procptr
                                             000000     055800
     4393 D  pePostData                     *   value
                                             000000     055900
     4394 D  pePostDataLen                10I 0 value
                                             000000     056000
     4395 D  peComm                         *   value
                                             000000     056100
     4396 D  peFile                       10I 0 value
                                             000000     056200
     4397 D  peTimeout                    10I 0 value
                                             000000     056300
     4398 D  peAbsPath                 32767A   const varying
   options(*varsize)                                     000000
   056400
     4399 D  peHost                      256A   const
                                             000000     056500
     4400 D  peUserAgent                  64A   options(*omit)
                                              000000     056600
     4401 D  peContentType                64A   options(*omit)
                                              000000     056700
     4402 D  peSoapAction                 64A   options(*omit)
                                              000000     056800
     4403 D  pePostProc                     *   value procptr
                                             000000     056900
     4404 D  pePostFD                     10I 0 value
                                             000000     057000
     4405 D  pePort                       10I 0 value
                                             000000     057100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   82
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4406 D  peSecure                      1N   value
                                             000000     057200
     4407 D  peServ                       32A   const
                                             000000     057300
     4408
                                             000000     057400
     4409 D SendProc        PR            10I 0 extproc(peSendProc)
                                             000000     057500
     4410 D  peComm                         *   value
                                             000000     057600
     4411 D  pePostData                     *   value
                                             000000     057700
     4412 D  pePostDataLen                10I 0 value
                                             000000     057800
     4413 D  peTimeout                    10I 0 value
                                             000000     057900
     4414 D  pePostProc                     *   procptr value
                                             000000     058000
     4415 D  pePostFD                     10I 0 value
                                             000000     058100
     4416
                                             000000     058200
     4417 D wwReqChain      S          32767A   varying
                                             000000     058300
     4418 D wwRespChain     S          32767A   varying
                                             070611     058400
     4419 D wwAddlHdr       s           1024A   varying
                                             000000     058500
     4420 D wwModString     S             29A
                                             000000     058600
     4421 D rc              S             10I 0
                                             000000     058700
     4422 D wwPos           S             10I 0
                                             000000     058800
     4423 D wwPos2          S             10I 0
                                             000000     058900
     4424 D wwTE            S             32A
                                             000000     059000
     4425 D wwAuthErr       S              1N   inz(*OFF)
                                             000000     059100
     4426 D wwProxyAuthErr...
                                             000000     059200
     4427 D                 S              1N   inz(*OFF)
                                             000000     059300
     4428 D wwCLen          S             10U 0
                                             000000     059400
     4429 D wwCL            S             32A
                                             000000     059500
     4430 D wwUseCL         s              1N
                                             000000     059600
     4431 D wwFinRC         S             10I 0
                                             070409     059700
     4432 D wwErrorNo       s             10I 0
                                             000000     059800
     4433 D wwErrorMsg      s                   like(http_error)
                                              000000     059900
     4434 D wwErr           s             10I 0
                                             000000     060000
     4435 d wwPathPfx       s           1024A   varying
                                             000000     060100
     4436
                                             000000     060200
     4437 c                   callp     debug_msg('do_post(): entered')
                                             000000     060300
     4438
                                             000000     060400
     4439 C*********************************************************
                                              000000     060500
     4440 C*  Build an HTTP/1.1 request chain:
                                              000000     060600
     4441 C*********************************************************
                                              000000     060700
     4442 c* If Connection is done via Proxy, an URI instead of just the
   path has to be sent.                       000000     060800
     4443 c                   if        dsProxyHost <> *blanks
                                    B01       000000     060900
     4444 c                               and dsProxyTun = *Off
                                   B01       070611     061000
     4445 c                   eval      wwPathPfx = %trim(peServ) + '://'
   +                                01       000000     061100
     4446 c                             %trim(peHost)
                                    01       000000     061200
     4447 c                   if        pePort <> 0
                                   B02       000000     061300
     4448 c                   eval      wwPathPfx = wwPathPfx + ':' +
                                    02       000000     061400
     4449 c
   %trim(%editc(pePort:'L'))                               02
   000000     061500
     4450 c                   endif
                                   E02       000000     061600
     4451 c                   else
                                    X01       000000     061700
     4452 c                   eval      wwPathPfx = ''
                                     01       000000     061800
     4453 c                   endif
                                   E01       000000     061900
     4454 c
                                   E01       000000     062000
     4455 c                   eval      wwReqChain =
                                              000000     062100
     4456 c                             'POST ' +
   wwPathPfx+%trim(peAbsPath) +
   000000     062200
     4457 c                                    ' HTTP/1.1'+CRLF+
                                              000000     062300
     4458 c                             'Host: '+%trim(peHost)
                                              000000     062400
     4459
                                             000000     062500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   83
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4460 c                   if        pePort = 0
                                    B01       000000     062600
     4461 c                   eval      wwReqChain = wwReqChain + CRLF
                                     01       000000     062700
     4462 c                   else
                                    X01       000000     062800
     4463 c                   eval      wwReqChain = wwReqChain + ':'
                                    01       000000     062900
     4464 c                                        +
   %trim(%editc(pePort:'L'))                             01       000000
       063000
     4465 c                                        + CRLF
                                    01       000000     063100
     4466 c                   endif
                                   E01       000000     063200
     4467
                                             000000     063300
     4468 c                   if        %addr(peUserAgent)<>*NULL
                                   B01       000000     063400
     4469 c                   if        peUserAgent <> *blanks
                                    B02       000000     063500
     4470 c                   eval      wwReqChain = wwReqChain +
                                    02       000000     063600
     4471 c                             'User-Agent:
   '+%trimr(peUserAgent)+CRLF                            02       000000
       063700
     4472 c                   endif
                                   E02       000000     063800
     4473 c                   else
                                    X01       000000     063900
     4474 c                   eval      wwReqChain = wwReqChain +
                                    01       000000     064000
     4475 c                             'User-Agent: ' + HTTP_USERAGENT +
   CRLF                             01       000000     064100
     4476 c                   endif
                                   E01       000000     064200
     4477
                                             000000     064300
     4478 c                   if        %addr(peContentType) <> *NULL
                                   B01       000000     064400
     4479 c                   if        peContentType <> *blanks
                                    B02       000000     064500
     4480 c                   eval      wwReqChain = wwReqChain +
                                    02       000000     064600
     4481 c                             'Content-Type:
   '+%trimr(peContentType)+                            02       000000
     064700
     4482 c                             CRLF
                                     02       000000     064800
     4483 c                   endif
                                   E02       000000     064900
     4484 c                   else
                                    X01       000000     065000
     4485 c                   eval      wwReqChain = wwReqChain +
                                    01       000000     065100
     4486 c                             'Content-Type: ' + HTTP_CONTTYPE
   + CRLF                            01       000000     065200
     4487 c                   endif
                                   E01       000000     065300
     4488
                                             000000     065400
     4489 c                   if        %addr(peSOAPAction) <> *NULL
                                    B01       000000     065500
     4490 c                   if        peSOAPAction <> *blanks
                                   B02       000000     065600
     4491 c                   eval      wwReqChain = wwReqChain +
                                    02       000000     065700
     4492 c                             'SOAPAction: '
   +%trimr(peSOAPAction)+                              02       000000
     065800
     4493 c                             CRLF
                                     02       000000     065900
     4494 c                   else
                                    X02       000000     066000
     4495 c                   eval      wwReqChain = wwReqChain +
                                    02       000000     066100
     4496 c                             'SOAPAction:  ' + CRLF
                                     02       000000     066200
     4497 c                   endif
                                   E02       000000     066300
     4498 c                   endif
                                   E01       000000     066400
     4499
                                             000000     066500
     4500 c                   eval      wwReqChain = wwReqChain +
                                             000000     066600
     4501 c                             'Expect: 100-continue' + CRLF
                                             000000     066700
     4502 c                   eval      wwReqChain = wwReqChain +
                                             000000     066800
     4503 c                             'Content-Length: ' +
                                              000000     066900
     4504 c                             %trim(%editc(pePostDataLen:'P'))
   + CRLF                                     000000     067000
     4505
                                             070611     067100
     4506 c                   if        dsProxyAuthType = HTTP_AUTH_BASIC
                                   B01       070611     067200
     4507 c                                and dsProxyTun = *off
                                    B01       070611     067300
     4508 c                   eval      wwReqChain = wwReqChain +
                                    01       070611     067400
     4509 c                             'Proxy-Authorization: Basic '+
                                     01       070611     067500
     4510 c                             dsProxyAuthStr + CRLF
                                    01       070611     067600
     4511 c                   endif
                                   E01       070611     067700
     4512
                                             000000     067800
     4513 c                   select
                                    B01       000000     067900
     4514 c                   when      dsAuthType = HTTP_AUTH_BASIC
                                    X01       000000     068000
     4515 c                   eval      wwReqChain = wwReqChain +
                                    01       000000     068100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   84
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4516 c                             'Authorization: Basic ' +
                                    01       000000     068200
     4517 c                              dsAuthStr + CRLF
                                    01       000000     068300
     4518 c                   when      dsAuthType = HTTP_AUTH_MD5_DIGEST
                                   X01       000000     068400
     4519 c                   eval      wwReqChain = wwReqChain +
                                    01       000000     068500
     4520 c                             'Authorization: Digest ' +
                                     01       000000     068600
     4521 c                              mkdigest('POST':peAbsPath) +
   CRLF                                 01       000000     068700
     4522 c                   endsl
                                   E01       000000     068800
     4523
                                             000000     068900
     4524 c                   if        use_cookies = *on
                                   B01       000000     069000
     4525 c                   eval      wwReqChain = wwReqChain +
                                    01       000000     069100
     4526 c                             header_get_req_cookies(
   %trim(peHost)                              01       000000     069200
     4527 c                                                   : peAbsPath
                                    01       000000     069300
     4528 c                                                   : peSecure
   )                                 01       000000     069400
     4529 c                   endif
                                   E01       000000     069500
     4530
                                             000000     069600
     4531 c                   if        wkAddHdrProc <> *NULL
                                   B01       000000     069700
     4532 c                   callp     addl_headers(wwAddlHdr:
   wkAddHdrData)                              01       000000     069800
     4533 c                   eval      wwReqChain = wwReqChain +
   wwAddlHdr                                01       000000     069900
     4534 c                   endif
                                   E01       000000     070000
     4535
                                             000000     070100
     4536 c                   eval      wwReqChain = wwReqChain + CRLF
                                              000000     070200
     4537
                                             000000     070300
     4538  *********************************************************
                                              000000     070400
     4539  *  Send request chain & get response
                                             000000     070500
     4540  *********************************************************
                                              000000     070600
     4541 c                   eval      rc = SendReq( peComm
                                              070611     070700
     4542 c                                         : %addr(wwReqChain)+2
                                             000000     070800
     4543 c                                         : %len(wwReqChain)
                                              000000     070900
     4544 c                                         : peTimeout )
                                             000000     071000
     4545 c                   if        rc < 1
                                    B01       000000     071100
     4546 c                   return    rc
                                     01       000000     071200
     4547 c                   endif
                                   E01       000000     071300
     4548
                                             000000     071400
     4549 c                   eval      rc = RecvResp( peComm
                                             070611     071500
     4550 c                                          : wwRespChain
                                              000000     071600
     4551 c                                          : %size(wwRespChain)
                                             000000     071700
     4552 c                                          : wk100time
                                              000000     071800
     4553 c                                          : *ON )
                                              000000     071900
     4554 c                   if        rc<0
                                    B01       000000     072000
     4555 c                   return    rc
                                     01       000000     072100
     4556 c                   endif
                                   E01       000000     072200
     4557
                                             000000     072300
     4558  *********************************************************
                                              000000     072400
     4559  * Interpret response.  It can be "100" meaning that
                                              000000     072500
     4560  * we continue with a POST request.  Or an error.
                                             000000     072600
     4561  *********************************************************
                                              000000     072700
     4562 c                   if        rc = 0
                                    B01       000000     072800
     4563
                                             000000     072900
     4564 c                   eval      wwFinRC = 100
                                    01       000000     073000
     4565 c                   eval      wwErrorMsg = 'CONTINUE'
                                    01       000000     073100
     4566
                                             000000     073200
     4567 c                   else
                                    X01       000000     073300
     4568
                                             000000     073400
     4569 c                   eval      rc = parse_resp_chain(
   wwRespChain                                 01       000000     073500
     4570 c                                                  : rc
                                    01       000000     073600
     4571 c                                                  : wwTE
                                    01       000000     073700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   85
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4572 c                                                  : wwCLen
                                    01       000000     073800
     4573 c                                                  : wwUseCL
                                     01       000000     073900
     4574 c                                                  : wwAuthErr
                                     01       000000     074000
     4575 c                                                  :
   wwProxyAuthErr                              01       000000     074100
     4576 c                                                  :
   %trim(peHost)                               01       000000     074200
     4577 c                                                  : peAbsPath)
                                    01       000000     074300
     4578 c                   if        rc<100 or rc=204 or rc=304
                                    B02       000000     074400
     4579 c                   return    rc
                                     02       000000     074500
     4580 c                   endif
                                   E02       000000     074600
     4581
                                             000000     074700
     4582 c                   eval      wwFinRC = rc
                                     01       000000     074800
     4583 c                   eval      wwErrorMsg =
   http_error(wwErrorNo)                                 01       000000
       074900
     4584
                                             000000     075000
     4585 c                   endif
                                   E01       000000     075100
     4586
                                             000000     075200
     4587  *********************************************************
                                              000000     075300
     4588  * If we received the go-ahead, send the document
                                             000000     075400
     4589  *********************************************************
                                              000000     075500
     4590 c                   if        wwFinRC = 100
                                   B01       000000     075600
     4591
                                             000000     075700
     4592 c                   eval      rc = SendProc( peComm
                                    01       070409     075800
     4593 c                                          : pePostData
                                    01       070409     075900
     4594 c                                          : pePostDataLen
                                     01       070409     076000
     4595 c                                          : peTimeout
                                     01       070409     076100
     4596 c                                          : pePostProc
                                    01       070409     076200
     4597 c                                          : pePostFD )
                                    01       070409     076300
     4598 c                   if        rc < 1
                                    B02       000000     076400
     4599 c                   return    rc
                                     02       000000     076500
     4600 c                   endif
                                   E02       000000     076600
     4601
                                             000000     076700
     4602 c                   eval      rc = RecvResp( peComm
                                    01       070611     076800
     4603 c                                          : wwRespChain
                                     01       070611     076900
     4604 c                                          : %size(wwRespChain)
                                    01       070611     077000
     4605 c                                          : peTimeout
                                     01       070611     077100
     4606 c                                          : *Off )
                                    01       070611     077200
     4607 c                   if        rc < 1
                                    B02       000000     077300
     4608 c                   return    rc
                                     02       000000     077400
     4609 c                   endif
                                   E02       000000     077500
     4610
                                             000000     077600
     4611 c                   eval      rc = parse_resp_chain(
   wwRespChain                                 01       000000     077700
     4612 c                                                  : rc
                                    01       000000     077800
     4613 c                                                  : wwTE
                                    01       000000     077900
     4614 c                                                  : wwCLen
                                    01       000000     078000
     4615 c                                                  : wwUseCL
                                     01       000000     078100
     4616 c                                                  : wwAuthErr
                                     01       000000     078200
     4617 c                                                  :
   wwProxyAuthErr                              01       000000     078300
     4618 c                                                  :
   %trim(peHost)                               01       000000     078400
     4619 c                                                  : peAbsPath
   )                                 01       000000     078500
     4620
                                             000000     078600
     4621 c                   if        rc<100 or rc=204 or rc=304
                                    B02       000000     078700
     4622 c                   return    rc
                                     02       000000     078800
     4623 c                   endif
                                   E02       000000     078900
     4624
                                             000000     079000
     4625 c                   eval      wwFinRC = rc
                                     01       000000     079100
     4626 c                   eval      wwErrorMsg =
   http_error(wwErrorNo)                                 01       000000
       079200
     4627
                                             000000     079300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   86
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4628 c                   endif
                                   E01       000000     079400
     4629
                                             000000     079500
     4630 C*********************************************************
                                              000000     079600
     4631 C* receive the document from the server
                                             000000     079700
     4632 C*********************************************************
                                              000000     079800
     4633 c                   if        %scan('chunked': wwTE) > 0
                                    B01       000000     079900
     4634 c                   eval      rc = RecvChunk(peComm:
   peSaveProc:                                 01       070611     080000
     4635 c                                    peFile: peTimeout)
                                    01       000000     080100
     4636 c                   else
                                    X01       000000     080200
     4637 c                   eval      rc = RecvDoc(peComm: peSaveProc:
                                     01       070611     080300
     4638 c                                    peFile: peTimeout: wwCLen:
                                    01       000000     080400
     4639 c                                    wwUseCL)
                                    01       000000     080500
     4640 c                   endif
                                   E01       000000     080600
     4641
                                             000000     080700
     4642 c                   if        rc<1 or wwFinRC=200
                                   B01       000000     080800
     4643 c                   return    rc
                                     01       000000     080900
     4644 c                   else
                                    X01       000000     081000
     4645 c                   callp     SetError(wwErrorNo: wwErrorMsg)
                                    01       000000     081100
     4646 c                   return    wwFinRC
                                    01       000000     081200
     4647 c                   endif
                                   E01       000000     081300
     4648 P                 E
                                             000000     081400
     4649
                                             000000     081500
     4650
                                             000000     081600
     4651
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     081700
     4652  * SendReq():  Send request chain
                                             000000     081800
     4653
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     081900
     4654 P SendReq         B
                                             000000     082000
     4655 D SendReq         PI            10I 0
                                             000000     082100
     4656 D   peComm                        *   value
                                             000000     082200
     4657 D   peData                        *   value
                                             000000     082300
     4658 D   peDataLen                   10I 0 value
                                             000000     082400
     4659 D   peTimeout                   10I 0 value
                                             000000     082500
     4660 D p_deref         s               *
                                             000000     082600
     4661 D wwDeref         s              1A   based(p_deref)
                                              000000     082700
     4662
                                             000000     082800
     4663 c                   callp     http_xlatep( peDataLen
                                              000000     082900
     4664 c                                        : peData
                                             000000     083000
     4665 c                                        : TO_ASCII )
                                             000000     083100
     4666
                                             000000     083200
     4667 c                   return    comm_BlockWrite( peComm
                                             000000     083300
     4668 c                                            : peData
                                             000000     083400
     4669 c                                            : peDataLen
                                              000000     083500
     4670 c                                            : peTimeout )
                                              000000     083600
     4671 P                 E
                                             000000     083700
     4672
                                             000000     083800
     4673
                                             000000     083900
     4674
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     084000
     4675  *  recvresp():  Receives an HTTP response chain from the
   server.                                         000000     084100
     4676  *
                                              000000     084200
     4677  *      peComm = Comm driver to use when receiving
                                              000000     084300
     4678  * peRespChain = complete request chain to sent
                                             000000     084400
     4679  *   peRespLen = length of request chain data
                                             000000     084500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   87
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4680  *  peTimeOut  = Timeout value in seconds.  If no data can be
   sent                                        000000     084600
     4681  *         for this amount of time, it will return a timeout.
                                             000000     084700
     4682  *    peUse100 = Return from recvresp() if a 100-continue comes
   up                                        000000     084800
     4683  *
                                              000000     084900
     4684  *  Returns 1 upon success, 0 upon timeout, -1 upon error
                                             000000     085000
     4685
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     085100
     4686 P recvresp        B
                                             000000     085200
     4687 D recvresp        PI            10I 0
                                             000000     085300
     4688 D   peComm                        *   value
                                             000000     085400
     4689 D   peRespChain              32767A   varying options(*varsize)
                                             000000     085500
     4690 D   peRespLen                   10I 0 value
                                             000000     085600
     4691 D   peTimeOut                   10P 3 value
                                             000000     085700
     4692 D   peUse100                     1N   const
                                             000000     085800
     4693
                                             000000     085900
     4694 D wwPos           S               *
                                             000000     086000
     4695 D wwRec           S             10I 0
                                             000000     086100
     4696 D wwLen           S             10I 0
                                             000000     086200
     4697 D p_saveaddr      S               *
                                             000000     086300
     4698 D p_check         S               *
                                             000000     086400
     4699 D wwCheck         S              4A   based(p_check)
                                              000000     086500
     4700 D wwRespCode      S             10I 0
                                             000000     086600
     4701 D forever         S              1N   inz(*On)
                                              000000     086700
     4702 D repeating       S              1N   inz(*Off)
                                             000000     086800
     4703 D wwSecs          s             10I 0
                                             000000     086900
     4704 D wwMicroSecs     s             10I 0
                                             000000     087000
     4705 D wwLeft          s             10I 0
                                             000000     087100
     4706 D wwErr           s             10I 0
                                             000000     087200
     4707 D CR              S              1A   inz(x'0d') static
                                             000000     087300
     4708
                                             000000     087400
     4709 c                   callp     debug_msg('recvresp(): entered')
                                              000000     087500
     4710
                                             000000     087600
     4711 c                   dou       not repeating
                                   B01       000000     087700
     4712
                                             000000     087800
     4713 c                   eval      wwPos = %addr(peRespChain) + 2
                                     01       000000     087900
     4714 c                   eval      wwLeft = peRespLen - 2
                                     01       070611     088000
     4715 c                   eval      %len(peRespChain) = wwLeft
                                     01       000000     088100
     4716 c                   eval      wwLen = 0
                                    01       000000     088200
     4717
                                             000000     088300
     4718 c                   dow       wwLeft > 0
                                    B02       000000     088400
     4719
                                             000000     088500
     4720 c                   eval      wwRec = comm_lineread( peComm
                                    02       000000     088600
     4721 c                                                  : wwPos
                                     02       000000     088700
     4722 c                                                  : wwLeft
                                    02       000000     088800
     4723 c                                                  : peTimeout
   )                                 02       000000     088900
     4724
                                             000000     089000
     4725 c                   if        wwRec < 1
                                   B03       000000     089100
     4726 c                   callp     http_error(wwErr)
                                    03       000000     089200
     4727 c                   if        wwErr = HTTP_BRTIME
                                   B04       000000     089300
     4728 c                   return    0
                                    04       000000     089400
     4729 c                   else
                                    X04       000000     089500
     4730 c                   return    -1
                                     04       000000     089600
     4731 c                   endif
                                   E04       000000     089700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   88
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4732 c                   endif
                                   E03       000000     089800
     4733
                                             000000     089900
     4734 c                   eval      wwPos = wwPos + wwRec
                                    02       000000     090000
     4735 c                   eval      wwLeft = wwLeft - wwRec
                                    02       000000     090100
     4736 c                   eval      wwLen = wwLen + wwRec
                                    02       000000     090200
     4737
                                             000000     090300
     4738 c                   if        wwLen >= 4
                                    B03       000000     090400
     4739 c                   eval      p_check = wwPos - 4
                                    03       000000     090500
     4740 c                   if        wwCheck = x'0d0a0d0a'
                                   B04       000000     090600
     4741 c                   leave
                                    04       000000     090700
     4742 c                   endif
                                   E04       000000     090800
     4743 c                   endif
                                   E03       000000     090900
     4744
                                             000000     091000
     4745 c                   enddo
                                   E02       000000     091100
     4746
                                             000000     091200
     4747 c                   eval      %len(peRespChain) = wwLen
                                    01       000000     091300
     4748
                                             000000     091400
     4749 C* translate response chain to EBCDIC
                                             000000     091500
     4750 c                   if        wwLen > 0
                                   B02       000000     091600
     4751 c                   callp     http_xlatep( wwLen
                                     02       000000     091700
     4752 c                                        : %addr(peRespChain) +
   2                                02       000000     091800
     4753 c                                        : TO_EBCDIC )
                                     02       000000     091900
     4754 c                   endif
                                   E02       000000     092000
     4755
                                             000000     092100
     4756 C* check for "continue" type codes:
                                             000000     092200
     4757 C* if we get them, we'll look for a whole new chain :)
                                              000000     092300
     4758 c                   if        %subst(peRespChain:1:2) = x'0d25'
                                   B02       000000     092400
     4759 c                   eval      p_check = %addr(peRespChain) + 13
                                    02       000000     092500
     4760 c                   else
                                    X02       000000     092600
     4761 c                   eval      p_check = %addr(peRespChain) + 11
                                    02       000000     092700
     4762 c                   endif
                                   E02       000000     092800
     4763 c                   eval      wwRespCode = atoi(wwCheck)
                                     01       000000     092900
     4764
                                             000000     093000
     4765 c                   select
                                    B02       000000     093100
     4766 c                   when      peUse100 and wwRespCode = 100
                                   X02       000000     093200
     4767  *                 we are handling this specially in do_post
                                              000000     093300
     4768 c                   eval      repeating = *off
                                     02       000000     093400
     4769 c                   when      wwRespCode > 99 and wwRespCode <
   200                              X02       000000     093500
     4770 c                   eval      repeating = *on
                                    02       000000     093600
     4771 c                   other
                                   X02       000000     093700
     4772 c                   eval      repeating = *off
                                     02       000000     093800
     4773 c                   endsl
                                   E02       000000     093900
     4774
                                             000000     094000
     4775 c                   if        %scan(CR:peRespChain) > 1
                                   B02       000000     094100
     4776 c                   callp     SetError(HTTP_RESP:
   %subst(peRespChain:1:                          02       000000
   094200
     4777 c                                 %scan(CR:peRespChain)-1) )
                                     02       000000     094300
     4778 c                   else
                                    X02       000000     094400
     4779 c                   callp     SetError(HTTP_RESP: peRespChain)
                                     02       000000     094500
     4780 c                   endif
                                   E02       000000     094600
     4781
                                             000000     094700
     4782 c                   enddo
                                   E01       000000     094800
     4783
                                             000000     094900
     4784 c                   return    wwRespCode
                                              000000     095000
     4785 P                 E
                                             000000     095100
     4786
                                             000000     095200
     4787
                                             000000     095300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   89
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4788
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     095400
     4789  * recvdoc(): receive (Download) http document
                                              000000     095500
     4790  *
                                              000000     095600
     4791  *       peComm = Comm driver to receive with
                                             000000     095700
     4792  *  peProcedure = procedure to call with received data.
                                             000000     095800
     4793  *    peTimeout = time-out in seconds.  If no data is received
                                              000000     095900
     4794  *          for this amount of time, proc will time out.
                                              000000     096000
     4795  *
                                              000000     096100
     4796  *  returns 1 upon success, 0 upon timeout, -1 upon failure
                                             000000     096200
     4797
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     096300
     4798 P recvdoc         B
                                             000000     096400
     4799 D recvdoc         PI            10I 0
                                             000000     096500
     4800 D   peComm                        *   value
                                             000000     096600
     4801 D   peProcedure                   *   value procptr
                                             000000     096700
     4802 D   peFD                        10I 0 value
                                             000000     096800
     4803 D   peTimeout                   10I 0 value
                                             000000     096900
     4804 D   peCLen                      10U 0 value
                                             000000     097000
     4805 D   peUseCL                      1N   const
                                             000000     097100
     4806
                                             000000     097200
     4807 D saveproc        PR            10I 0 ExtProc(peProcedure)
                                              000000     097300
     4808 D  fd                           10I 0 value
                                             000000     097400
     4809 D  data                           *   value
                                             000000     097500
     4810 D  length                       10I 0 value
                                             000000     097600
     4811
                                             000000     097700
     4812 D wwData          S           8192A
                                             000000     097800
     4813 D forever         S              1N   inz(*on)
                                              000000     097900
     4814 D wwErr           S             10I 0
                                             000000     098000
     4815 D p_saveaddr      S               *
                                             000000     098100
     4816 D wwTimeout       S              8A
                                             000000     098200
     4817 D wwLen           S             10I 0
                                             000000     098300
     4818 D rc              S             10I 0
                                             000000     098400
     4819 D wwChunked       S              1N
                                             000000     098500
     4820 D wwChunk         S             10I 0
                                             000000     098600
     4821 D wwReceived      S             10U 0
                                             000000     098700
     4822 D wwRet           s             10I 0
                                             000000     098800
     4823
                                             000000     098900
     4824 c                   callp     debug_msg('recvdoc(): entered')
                                             000000     099000
     4825 c                   callp     SetError(0: *blanks)
                                              000000     099100
     4826 c                   eval      wwReceived = 0
                                              000000     099200
     4827
                                             000000     099300
     4828 c                   if        peUseCL = *OFF
                                    B01       000000     099400
     4829 c                   eval      wwRet = 1
                                    01       000000     099500
     4830 c                   else
                                    X01       000000     099600
     4831 c                   eval      wwRet = -1
                                     01       000000     099700
     4832 c                   endif
                                   E01       000000     099800
     4833
                                             000000     099900
     4834 c                   if        peUseCL=*ON and peCLen=0
                                    B01       000000     100000
     4835 c                   return    1
                                    01       000000     100100
     4836 c                   endif
                                   E01       000000     100200
     4837
                                             000000     100300
     4838 c                   dow       forever
                                   B01       000000     100400
     4839
                                             000000     100500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   90
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4840 c                   eval      wwLen = comm_read( peComm
                                    01       000000     100600
     4841 c                                              : %addr(wwData)
                                     01       000000     100700
     4842 c                                              : %size(wwData)
                                     01       000000     100800
     4843 c                                              : peTimeout
   )                                 01       000000     100900
     4844
                                             000000     101000
     4845 c                   if        wwLen < 0
                                   B02       000000     101100
     4846 c                   return    wwRet
                                    02       000000     101200
     4847 c                   endif
                                   E02       000000     101300
     4848
                                             000000     101400
     4849 c                   eval      rc = saveproc( peFD
                                    01       000000     101500
     4850 c                                          : %addr(wwData)
                                     01       000000     101600
     4851 c                                          : wwLen )
                                     01       000000     101700
     4852 c                   if        rc < wwLen
                                    B02       000000     101800
     4853 c                   callp     SetError(HTTP_RDWERR
                                     02       000000     101900
     4854 c                                     : 'errno is currently '
                                    02       000000     102000
     4855 c                                     +
   %trim(%editc(errno:'L')))                                02
   000000     102100
     4856 c                   callp     SetError(HTTP_RDWERR:'recvdoc:
   saveproc:'+                         02       000000     102200
     4857 c                              ' Not all data was written!')
                                     02       000000     102300
     4858 c                   return    -1
                                     02       000000     102400
     4859 c                   endif
                                   E02       000000     102500
     4860
                                             000000     102600
     4861 c                   eval      wwReceived = wwReceived + wwLen
                                    01       000000     102700
     4862 c                   if        peUseCL=*ON and
   wwReceived>=peCLen                                B02       000000
   102800
     4863 c                   return    1
                                    02       000000     102900
     4864 c                   endif
                                   E02       000000     103000
     4865
                                             000000     103100
     4866 C* Call status proc if defined
                                              000000     103200
     4867 c                   if        wkDwnlProc <> *NULL
                                   B02       000000     103300
     4868 c                   callp     download_sts(wwReceived: peCLen
                                    02       000000     103400
     4869 c                                         : wkDwnlUdata)
                                     02       000000     103500
     4870 c                   endif
                                   E02       000000     103600
     4871
                                             000000     103700
     4872 c                   enddo
                                   E01       000000     103800
     4873
                                             000000     103900
     4874 P                 E
                                             000000     104000
     4875
                                             000000     104100
     4876
                                             000000     104200
     4877
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     104300
     4878  * recvchunk(): receive (download) data using chunked
   transfer-encoding                                   000000     104400
     4879  *
                                              000000     104500
     4880  *       peComm = Comm driver to receive from
                                             000000     104600
     4881  *  peProcedure = procedure to call with received data.
                                             000000     104700
     4882  *    peTimeout = time-out in seconds.  If no data is received
                                              000000     104800
     4883  *          for this amount of time, proc will time out.
                                              000000     104900
     4884  *
                                              000000     105000
     4885  *  returns 1 upon success, 0 upon timeout, -1 upon failure
                                             000000     105100
     4886
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     105200
     4887 P recvchunk       B
                                             000000     105300
     4888 D recvchunk       PI            10I 0
                                             000000     105400
     4889 D   peComm                        *   value
                                             000000     105500
     4890 D   peProcedure                   *   value procptr
                                             000000     105600
     4891 D   peFD                        10I 0 value
                                             000000     105700
     4892 D   peTimeout                   10I 0 value
                                             000000     105800
     4893
                                             000000     105900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   91
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4894 D saveproc        PR            10I 0 ExtProc(peProcedure)
                                              000000     106000
     4895 D  fd                           10I 0 value
                                             000000     106100
     4896 D  data                           *   value
                                             000000     106200
     4897 D  length                       10I 0 value
                                             000000     106300
     4898
                                             000000     106400
     4899 D wwData          s           8192A
                                             000000     106500
     4900 D forever         S              1N   inz(*on)
                                              000000     106600
     4901 D rc              S             10I 0
                                             000000     106700
     4902 D wwLeft          S             10I 0
                                             000000     106800
     4903 D wwRecSize       S             10I 0
                                             000000     106900
     4904 D wwCRLF          s              2A
                                             000000     107000
     4905 D wwReceived      S             10U 0
                                             000000     107100
     4906
                                             000000     107200
     4907 c                   callp     debug_msg('recvchunk(): entered')
                                             000000     107300
     4908 c                   eval      wwReceived = 0
                                              000000     107400
     4909
                                             000000     107500
     4910 c                   dow       Forever
                                   B01       000000     107600
     4911
                                             000000     107700
     4912 C*********************************************************
                                              000000     107800
     4913 C* Receive the size of the next chunk of data:
                                              000000     107900
     4914 C*********************************************************
                                              000000     108000
     4915 c                   eval      wwLeft =
   get_chunk_size(peComm:peTimeout)                          01
   000000     108100
     4916 c                   callp     debug_msg('get_chunk_size
   returned ' +                             01       000000     108200
     4917 c
   %trim(%editc(wwLeft:'P')))                            01       000000
       108300
     4918 c                   select
                                    B02       000000     108400
     4919 c                   when      wwLeft = 0
                                    X02       000000     108500
     4920 c                   return    1
                                    02       000000     108600
     4921 c                   when      wwLeft = -2
                                   X02       000000     108700
     4922 c                   return    0
                                    02       000000     108800
     4923 c                   when      wwLeft = -1
                                   X02       000000     108900
     4924 c                   return    -1
                                     02       000000     109000
     4925 c                   endsl
                                   E02       000000     109100
     4926
                                             000000     109200
     4927 C*********************************************************
                                              000000     109300
     4928 c* Receive data until we have an entire chunk:
                                              000000     109400
     4929 C*********************************************************
                                              000000     109500
     4930 c                   dou       wwLeft = 0
                                    B02       000000     109600
     4931
                                             000000     109700
     4932 c                   eval      wwRecSize = %size(wwData)
                                    02       000000     109800
     4933 c                   if        wwLeft < wwRecSize
                                    B03       000000     109900
     4934 c                   eval      wwRecSize = wwLeft
                                     03       000000     110000
     4935 c                   endif
                                   E03       000000     110100
     4936
                                             000000     110200
     4937 c                   callp     debug_msg('calling
   comm_blockread')                                02       000000
   110300
     4938
                                             000000     110400
     4939 c                   if        comm_BlockRead( peComm
                                    B03       000000     110500
     4940 c                                           : %addr(wwData)
                                   B03       000000     110600
     4941 C                                           : wwRecSize
                                   B03       000000     110700
     4942 c                                           : peTimeout ) <
   wwRecSize                           B03       000000     110800
     4943 c                   callp     debug_msg('comm_blockread
   failed!')                                03       000000     110900
     4944 c                   return    -1
                                     03       000000     111000
     4945 c                   endif
                                   E03       000000     111100
     4946
                                             000000     111200
     4947 c                   callp     debug_msg('comm_blockread
   returned ' +                             02       000000     111300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   92
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     4948 c                              %trim(%editc(wwRecSize:'P')) )
                                    02       070731     111400
     4949
                                             000000     111500
     4950 C* Write any received data to the save procedure:
                                             000000     111600
     4951 c                   eval      rc = saveproc(peFD:
   %addr(wwData):                                 02       000000
   111700
     4952 c                                            wwRecSize)
                                    02       000000     111800
     4953 c                   if        rc < wwRecSize
                                    B03       000000     111900
     4954 c                   callp     SetError(HTTP_RDWERR:'recvchunk:
   saveproc:'+                       03       000000     112000
     4955 c                              ' Not all data was written!')
                                     03       000000     112100
     4956 c                   return    -1
                                     03       000000     112200
     4957 c                   endif
                                   E03       000000     112300
     4958
                                             000000     112400
     4959 c                   if        wkDwnlProc <> *NULL
                                   B03       000000     112500
     4960 c                   eval      wwReceived = wwReceived +
   wwRecSize                                03       000000     112600
     4961 c                   callp     download_sts(wwReceived: 0:
   wkDwnlUData)                           03       000000     112700
     4962 c                   endif
                                   E03       000000     112800
     4963
                                             000000     112900
     4964 c                   eval      wwLeft = wwLeft - wwRecSize
                                    02       000000     113000
     4965 c                   enddo
                                   E02       000000     113100
     4966
                                             000000     113200
     4967 C*********************************************************
                                              000000     113300
     4968 c* Receive the CRLF that follows each chunk
                                             000000     113400
     4969 C*********************************************************
                                              000000     113500
     4970 c                   if        comm_BlockRead( peComm
                                    B02       000000     113600
     4971 c                                           : %addr(wwCRLF)
                                   B02       000000     113700
     4972 c                                           : %size(wwCRLF)
                                   B02       000000     113800
     4973 c                                           : peTimeout ) < 2
                                   B02       000000     113900
     4974 c                             or wwCRLF <> x'0d0a'
                                    B02       000000     114000
     4975 c                   callp     SetError(HTTP_RDCRLF: 'recvchunk:
   '+                               02       000000     114100
     4976 c                                'No CRLF after reading
   chunk!')                                 02       000000     114200
     4977 c                   return    -1
                                     02       000000     114300
     4978 c                   endif
                                   E02       000000     114400
     4979
                                             000000     114500
     4980 c                   enddo
                                   E01       000000     114600
     4981 P                 E
                                             000000     114700
     4982
                                             000000     114800
     4983
                                             000000     114900
     4984
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     115000
     4985  *  This sends a document body, such as those used by the PUT
                                             000000     115100
     4986  *  or POST HTTP commands.
                                              000000     115200
     4987  *
                                              000000     115300
     4988  *  returns 0 for timeout, -1 for error or 1 if successful
                                              000000     115400
     4989
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     115500
     4990 P SendDoc         B
                                             000000     115600
     4991 D SendDoc         PI            10I 0
                                             000000     115700
     4992 D  peComm                         *   value
                                             000000     115800
     4993 D  pePostData                     *   value
                                             000000     115900
     4994 D  pePostDataLen                10I 0 value
                                             000000     116000
     4995 D  peTimeout                    10I 0 value
                                             000000     116100
     4996 D  peUnused1                      *   value procptr
                                             000000     116200
     4997 D  peUnused2                    10I 0 value
                                             000000     116300
     4998
                                             000000     116400
     4999 D wwPos           S               *
                                             000000     116500
     5000 D wwLeft          S             10I 0
                                             000000     116600
     5001 D wwTimeout       S              8A
                                             000000     116700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   93
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5002 D wwErr           S             10I 0
                                             000000     116800
     5003 D wwSent          S             10I 0
                                             000000     116900
     5004 D wwChunk         S             10I 0
                                             000000     117000
     5005
                                             000000     117100
     5006 c                   callp     debug_msg('senddoc(): entered')
                                             000000     117200
     5007
                                             000000     117300
     5008 c                   eval      wwPos = pePostData
                                              000000     117400
     5009 c                   eval      wwLeft = pePostDataLen
                                              000000     117500
     5010
                                             000000     117600
     5011 c                   dow       wwLeft > 0
                                    B01       000000     117700
     5012
                                             000000     117800
     5013 c                   eval      wwChunk = wwLeft
                                     01       000000     117900
     5014 c                   if        wwChunk > 8192
                                    B02       000000     118000
     5015 c                   eval      wwChunk = 8192
                                     02       000000     118100
     5016 c                   endif
                                   E02       000000     118200
     5017
                                             000000     118300
     5018 c                   eval      wwSent = comm_BlockWrite( peComm
                                     01       000000     118400
     5019 c                                                     : wwPos
                                    01       000000     118500
     5020 c                                                     : wwChunk
                                    01       000000     118600
     5021 c                                                     :
   peTimeout )                              01       000000     118700
     5022
                                             000000     118800
     5023 c                   eval      wwLeft = wwLeft - wwSent
                                     01       000000     118900
     5024 c                   eval      wwPos  = wwPos + wwSent
                                    01       000000     119000
     5025
                                             000000     119100
     5026 c                   if        wkUplProc <> *NULL
                                    B02       000000     119200
     5027 c                   callp     upload_sts(pePostDataLen-wwLeft
                                    02       000000     119300
     5028 c                                       : pePostDataLen
                                    02       000000     119400
     5029 c                                       : wkUplUData )
                                     02       000000     119500
     5030 c                   endif
                                   E02       000000     119600
     5031
                                             000000     119700
     5032 c                   enddo
                                   E01       000000     119800
     5033
                                             000000     119900
     5034 c                   return    1
                                             000000     120000
     5035 P                 E
                                             000000     120100
     5036
                                             000000     120200
     5037
                                             000000     120300
     5038
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     120400
     5039  *  This sends a document body, such as those used by the PUT
                                             000000     120500
     5040  *  or POST HTTP commands, but uses a callback instead of a
   buffer                                        000000     120600
     5041  *
                                              000000     120700
     5042  *  returns 0 for timeout, -1 for error or 1 if successful
                                              000000     120800
     5043
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     120900
     5044 P SendRaw         B
                                             000000     121000
     5045 D SendRaw         PI            10I 0
                                             000000     121100
     5046 D  peComm                         *   value
                                             000000     121200
     5047 D  peUnused1                      *   value
                                             000000     121300
     5048 D  peDataSize                   10I 0 value
                                             000000     121400
     5049 D  peTimeout                    10I 0 value
                                             000000     121500
     5050 D  pePostProc                     *   value procptr
                                             000000     121600
     5051 D  pePostFD                     10I 0 value
                                             000000     121700
     5052
                                             000000     121800
     5053 D Callback        PR            10I 0 extproc(pePostProc)
                                             000000     121900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   94
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5054 D   fd                          10I 0 value
                                             000000     122000
     5055 D   data                      8192A
                                             000000     122100
     5056 D   size                        10I 0 value
                                             000000     122200
     5057
                                             000000     122300
     5058 D wwLen           S             10I 0
                                             000000     122400
     5059 D wwBuf           s           8192A
                                             000000     122500
     5060 D wwSent          S             10I 0
                                             000000     122600
     5061 D wwNeed          S             10I 0
                                             000000     122700
     5062
                                             000000     122800
     5063 c                   callp     debug_msg('sendraw(): entered')
                                             000000     122900
     5064 c                   eval      wwSent = 0
                                              000000     123000
     5065
                                             000000     123100
     5066 c                   dow       peDataSize > wwSent
                                   B01       000000     123200
     5067
                                             000000     123300
     5068 c                   eval      wwNeed = %size(wwBuf)
                                    01       000000     123400
     5069 c                   if        wwNeed > peDataSize
                                   B02       000000     123500
     5070 c                   eval      wwNeed = peDataSize
                                    02       000000     123600
     5071 c                   endif
                                   E02       000000     123700
     5072
                                             000000     123800
     5073 c                   eval      wwLen = Callback( pePostFD
                                     01       000000     123900
     5074 c                                             : wwBuf
                                    01       000000     124000
     5075 c                                             : wwNeed )
                                     01       000000     124100
     5076
                                             000000     124200
     5077 c                   if        wwLen < 1
                                   B02       000000     124300
     5078 c                   callp     SetError( HTTP_SWCERR
                                    02       000000     124400
     5079 c                                     : 'SendRaw(): callback '
                                     02       000000     124500
     5080 c                                     + 'returned an error.')
                                    02       000000     124600
     5081 c                   return    -1
                                     02       000000     124700
     5082 c                   endif
                                   E02       000000     124800
     5083
                                             000000     124900
     5084 c                   if        wwLen > wwNeed
                                    B02       000000     125000
     5085 c                   callp     SetError( HTTP_SWCERR
                                    02       000000     125100
     5086 c                                     : 'SendRaw(): callback '
                                     02       000000     125200
     5087 c                                     + 'supplied too much
   data.')                               02       000000     125300
     5088 c                   return    -1
                                     02       000000     125400
     5089 c                   endif
                                   E02       000000     125500
     5090
                                             000000     125600
     5091 c                   if        comm_BlockWrite( peComm
                                   B02       000000     125700
     5092 c                                            : %addr(wwBuf)
                                   B02       000000     125800
     5093 c                                            : wwLen
                                    B02       000000     125900
     5094 c                                            : peTimeout
                                    B02       000000     126000
     5095 c                                            ) < wwLen
                                    B02       000000     126100
     5096 c                   return    -1
                                     02       000000     126200
     5097 c                   endif
                                   E02       000000     126300
     5098
                                             000000     126400
     5099 c                   eval      wwSent = wwSent + wwLen
                                    01       000000     126500
     5100
                                             000000     126600
     5101 c                   if        wkUplProc <> *NULL
                                    B02       000000     126700
     5102 c                   callp     upload_sts(wwSent
                                    02       000000     126800
     5103 c                                       : peDataSize
                                     02       000000     126900
     5104 c                                       : wkUplUData )
                                     02       000000     127000
     5105 c                   endif
                                   E02       000000     127100
     5106
                                             000000     127200
     5107 c                   enddo
                                   E01       000000     127300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   95
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5108
                                             000000     127400
     5109 c                   return    wwSent
                                              000000     127500
     5110 P                 E
                                             000000     127600
     5111
                                             000000     127700
     5112
                                             000000     127800
     5113
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     127900
     5114  *  This receives the chunk size from the http stream.  We use
                                              000000     128000
     5115  *   it so we know how big the next chunk of data is.
                                             000000     128100
     5116  *
                                              000000     128200
     5117  *  XXX: This will crash if 2gb or larger chunks are used.
                                              000000     128300
     5118
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     128400
     5119 P get_chunk_size  B
                                             000000     128500
     5120 d get_chunk_size  PI            10I 0
                                             000000     128600
     5121 d   peComm                        *   value
                                             000000     128700
     5122 d   peTimeout                   10I 0 value
                                             000000     128800
     5123
                                             000000     128900
     5124 d sscanf          PR            10I 0 extproc('sscanf')
                                             000000     129000
     5125 D  str                            *   value options(*string)
                                              000000     129100
     5126 D  format                         *   value options(*string)
                                              000000     129200
     5127 D  sexyfun                      10U 0
                                             000000     129300
     5128
                                             000000     129400
     5129 D wwLen           s             10I 0
                                             000000     129500
     5130 D rc              s             10I 0
                                             000000     129600
     5131 D wwBuf           s             15A
                                             000000     129700
     5132 D wwChunkSize     S             10U 0
                                             000000     129800
     5133 D wwErr           s             10I 0
                                             000000     129900
     5134
                                             000000     130000
     5135 c                   callp     debug_msg('get_chunk_size():
   entered')                                      000000     130100
     5136
                                             000000     130200
     5137 c                   eval      wwLen = comm_LineRead( peComm
                                             000000     130300
     5138 c                                                  :
   %addr(wwBuf)                                         000000     130400
     5139 c                                                  :
   %size(wwBuf)                                         000000     130500
     5140 c                                                  : peTimeout
   )                                          000000     130600
     5141
                                             000000     130700
     5142 c                   if        wwLen < 1
                                   B01       000000     130800
     5143 c                   callp     http_error(wwErr)
                                    01       000000     130900
     5144 c                   if        wwErr = HTTP_BRTIME
                                   B02       000000     131000
     5145 c                   return    -2
                                     02       000000     131100
     5146 c                   else
                                    X02       000000     131200
     5147 c                   return    -1
                                     02       000000     131300
     5148 c                   endif
                                   E02       000000     131400
     5149 c                   endif
                                   E01       000000     131500
     5150
                                             000000     131600
     5151 c                   callp     http_xlate( wwLen
                                             000000     131700
     5152 c                                       : wwBuf
                                             000000     131800
     5153 c                                       : TO_EBCDIC )
                                             000000     131900
     5154
                                             000000     132000
     5155 c                   eval      rc = %scan(';': wwBuf)
                                              000000     132100
     5156 c                   if        rc > 1
                                    B01       000000     132200
     5157 c                   eval      wwBuf = %subst(wwBuf:1:rc-1)
                                     01       000000     132300
     5158 c                   endif
                                   E01       000000     132400
     5159
                                             000000     132500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   96
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5160 c                   callp     sscanf(wwBuf: '%x': wwChunkSize)
                                              000000     132600
     5161
                                             000000     132700
     5162 c                   callp     debug_msg('chunk size = ' +
                                             000000     132800
     5163 c
   %trim(%editc(wwChunkSize:'P')))
    000000     132900
     5164
                                             000000     133000
     5165 c                   return    wwChunkSize
                                             000000     133100
     5166 P                 E
                                             000000     133200
     5167
                                             000000     133300
     5168
                                             000000     133400
     5169
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     133500
     5170  *  http_getauth():   Get HTTP Authentication Information
                                             000000     133600
     5171  *
                                              000000     133700
     5172  *   Call this proc after you receive a HTTP_NDAUTH error
                                             000000     133800
     5173  *   to determine the authentication credentials that are
   required                                        000000     133900
     5174  *
                                              000000     134000
     5175  *  The following parms are returned to your program:
                                             000000     134100
     5176  *
                                              000000     134200
     5177  *     peBasic = *ON if BASIC auth is allowed
                                             000000     134300
     5178  *    peDigest = *ON if MD5 DIGEST auth is allowed
                                              000000     134400
     5179  *     peRealm = Auth realm.  Present this to the user to
   identify                                        000000     134500
     5180  *               which password you're looking for.  For
   example                                          000000     134600
     5181  *               if peRealm is "secureserver.com" you might say
                                             000000     134700
     5182  *               "enter password for secureserver.com" to user.
                                             000000     134800
     5183  *
                                              000000     134900
     5184  *   After getting the userid & password from the user (or
   database)                                      000000     135000
     5185  *   you'll need to call http_setauth()
                                             000000     135100
     5186  *
                                              000000     135200
     5187  *  Returns -1 upon error, or 0 if successful
                                             000000     135300
     5188
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     135400
     5189 P http_getauth    B                   export
                                              000000     135500
     5190 D http_getauth    PI            10I 0
                                             000000     135600
     5191 D   peBasic                      1N
                                             000000     135700
     5192 D   peDigest                     1N
                                             000000     135800
     5193 D   peRealm                    124A
                                             000000     135900
     5194
                                             000000     136000
     5195 c                   callp     debug_msg('http_getauth():
   entered')                                        000000     136100
     5196 c                   if        dsAuthRealm = *blanks
                                   B01       000000     136200
     5197 c                   callp     SetError(HTTP_NOAUTH: 'Server did
   ' +                              01       000000     136300
     5198 c                              'not ask for authentication!')
                                    01       000000     136400
     5199 c                   return    -1
                                     01       000000     136500
     5200 c                   endif
                                   E01       000000     136600
     5201
                                             000000     136700
     5202 c                   eval      peBasic = dsAuthBasic
                                             000000     136800
     5203 c                   eval      peDigest = dsAuthDigest
                                             000000     136900
     5204 c                   eval      peRealm = dsAuthRealm
                                             000000     137000
     5205
                                             000000     137100
     5206 c                   return    0
                                             000000     137200
     5207 P                 E
                                             000000     137300
     5208
                                             000000     137400
     5209
                                             000000     137500
     5210
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     137600
     5211  *  http_setauth():   Set HTTP Authentication Information
                                             000000     137700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   97
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5212  *
                                              000000     137800
     5213  *     peAuthType = Authentication Type (HTTP_AUTH_BASIC or
                                             000000     137900
     5214  *                     HTTP_AUTH_MD5_DIGEST)
                                              000000     138000
     5215  *     peUsername = UserName to use
                                             000000     138100
     5216  *     pePasswd   = Password to use
                                             000000     138200
     5217  *
                                              000000     138300
     5218  *  Returns -1 upon error, or 0 if successful
                                             000000     138400
     5219
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     138500
     5220 P http_setauth    B                   export
                                              000000     138600
     5221 D http_setauth    PI            10I 0
                                             000000     138700
     5222 D   peAuthType                   1A   const
                                             000000     138800
     5223 D   peUsername                  80A   const
                                             000000     138900
     5224 D   pePasswd                  1024A   const
                                             000000     139000
     5225
                                             000000     139100
     5226 D wwString        S           1105A
                                             000000     139200
     5227 D wwEncoded       S           1476A
                                             000000     139300
     5228 D wwEncLen        S             10I 0
                                             000000     139400
     5229
                                             000000     139500
     5230 c                   callp     debug_msg('http_setauth():
   entered')                                        000000     139600
     5231 c                   if        peAuthType<>HTTP_AUTH_BASIC
                                   B01       000000     139700
     5232 c                               and
   peAuthType<>HTTP_AUTH_MD5_DIGEST                            B01
   000000     139800
     5233 c                               and peAuthType<>HTTP_AUTH_NONE
                                    B01       000000     139900
     5234 c                   callp     SetError(HTTP_ATHTYP: 'Invalid
   authenti'+                          01       000000     140000
     5235 c                                   'cation type!')
                                    01       000000     140100
     5236 c                   return    -1
                                     01       000000     140200
     5237 c                   endif
                                   E01       000000     140300
     5238
                                             000000     140400
     5239 C*************************************************
                                              000000     140500
     5240 c* Calculate strings for NO authentication
                                              000000     140600
     5241 C*************************************************
                                              000000     140700
     5242 c                   if        peAuthType = HTTP_AUTH_NONE
                                   B01       000000     140800
     5243 c                   eval      dsAuthType = HTTP_AUTH_NONE
                                    01       000000     140900
     5244 c                   eval      dsAuthStr = ''
                                     01       000000     141000
     5245 c                   return    0
                                    01       000000     141100
     5246 c                   endif
                                   E01       000000     141200
     5247
                                             000000     141300
     5248 c                   if        %scan(':':peUserName) > 0
                                   B01       000000     141400
     5249 c                              or %scan(':': pePasswd) > 0
                                    B01       000000     141500
     5250 c                   callp     SetError(HTTP_ATHVAL: 'HTTP Auth
   value' +                          01       000000     141600
     5251 c                               's cannot contain a colon!')
                                     01       000000     141700
     5252 c                   return    -1
                                     01       000000     141800
     5253 c                   endif
                                   E01       000000     141900
     5254
                                             000000     142000
     5255 c                   eval      dsAuthUser = peUserName
                                             000000     142100
     5256 c                   eval      dsAuthPasswd = pePasswd
                                             000000     142200
     5257
                                             000000     142300
     5258 c                   eval      wwString = %trimr(peUserName) +
   ':' +                                       000000     142400
     5259 c                                        %trimr(pePasswd)
                                             000000     142500
     5260 c                   callp     http_xlate(
   %len(%trimr(wwString))                                          000000
       142600
     5261 c                                       : wwString
                                              000000     142700
     5262 c                                       : TO_ASCII )
                                              000000     142800
     5263
                                             000000     142900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   98
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5264 c                   eval      wwEncLen =
   base64_encode(%addr(wwString):
   000000     143000
     5265 c
   %len(%trimr(wwString)):                                     000000
   143100
     5266 c                                             %addr(wwEncoded):
                                             000000     143200
     5267 c                                             %size(wwEncoded))
                                             000000     143300
     5268
                                             000000     143400
     5269 c                   eval      dsAuthStr =
   %subst(wwEncoded:1:wwEncLen)                                    000000
       143500
     5270 c                   eval      dsAuthType = peAuthType
                                             000000     143600
     5271
                                             000000     143700
     5272 c                   return    0
                                             000000     143800
     5273 P                 E
                                             000000     143900
     5274
                                             000000     144000
     5275
                                             000000     144100
     5276
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     144200
     5277  * setUrlAuth(): Set auth credentials if found in the URL
                                             000000     144300
     5278  *      peUsername = username found in URL
                                              000000     144400
     5279  *      pePasswd   = password found in URL
                                              000000     144500
     5280
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     144600
     5281 P setUrlAuth      B
                                             000000     144700
     5282 D setUrlAuth      PI
                                              000000     144800
     5283 D   peUsername                  80A   const
                                             000000     144900
     5284 D   pePasswd                  1024A   const
                                             000000     145000
     5285 c                   if        peUsername = *blanks
                                    B01       000000     145100
     5286 c                              and pePasswd = *blanks
                                   B01       000000     145200
     5287 c                   eval      wkSaveAuth = *blanks
                                     01       000000     145300
     5288 c                   return
                                     01       000000     145400
     5289 c                   endif
                                   E01       000000     145500
     5290
                                             000000     145600
     5291 c                   eval      wkSaveAuth = dsAuth
                                             000000     145700
     5292
                                             000000     145800
     5293 c                   if        dsAuthRealm = *blanks
                                   B01       000000     145900
     5294 c                               or dsAuthDigest = *OFF
                                    B01       000000     146000
     5295 c                   callp     http_setAuth( HTTP_AUTH_BASIC
                                    01       000000     146100
     5296 c                                         : peUsername
                                     01       000000     146200
     5297 c                                         : pePasswd )
                                     01       000000     146300
     5298 c                   else
                                    X01       000000     146400
     5299 c                   callp     http_setAuth(
   HTTP_AUTH_MD5_DIGEST                                 01       000000
     146500
     5300 c                                         : peUsername
                                     01       000000     146600
     5301 c                                         : pePasswd )
                                     01       000000     146700
     5302 c                   endif
                                   E01       000000     146800
     5303 c                   return
                                              000000     146900
     5304 P                 E
                                             000000     147000
     5305
                                             000000     147100
     5306
                                             000000     147200
     5307
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     147300
     5308  *  mkdigest():  Create a digest authorization string
                                             000000     147400
     5309  *
                                              000000     147500
     5310  *      peMethod = HTTP method in use (GET or POST)
                                             000000     147600
     5311  *
                                              000000     147700
     5312  *  Returns the digest authorization response
                                             000000     147800
     5313
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     147900
     5314 P mkdigest        B
                                             000000     148000
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   99
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5315 D mkdigest        PI         32767A   varying
                                             000000     148100
     5316 D   peMethod                     4A   const
                                             000000     148200
     5317 D   peURI                    32767A   varying const
   options(*varsize)                                     000000
   148300
     5318
                                             000000     148400
     5319 D wwRet           S          32767A   varying
                                             000000     148500
     5320 D wwWork          S          32767A   varying
                                             000000     148600
     5321 D wwA1            S             32A
                                             000000     148700
     5322 D wwA2            S             32A
                                             000000     148800
     5323 D wwResp          S             32A
                                             000000     148900
     5324
                                             000000     149000
     5325 c                   callp     debug_msg('mkdigest(): entered')
                                              000000     149100
     5326 C*  Authorization: Digest username="Mufasa",
                                              000000     149200
     5327 C*         realm="testrealm@xxxxxxxx",
                                              000000     149300
     5328 C*         nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093",
                                              000000     149400
     5329 C*         uri="/dir/index.html",
                                             000000     149500
     5330 C*         nc=00000001,
                                             000000     149600
     5331 C*         cnonce="0a4f113b",
                                             000000     149700
     5332 C*         response="6629fae49393a05397450978507c4ef1",
                                             000000     149800
     5333 C*         opaque="5ccc069c403ebaf9f0171e9517f40e41"
                                              000000     149900
     5334
                                             000000     150000
     5335 c*  response =
                                              000000     150100
     5336 C*     md5(md5(A1) + ':' + nonce + ':' + nc-value + ':' +
                                             000000     150200
     5337 c*          cnonce + ':' + qop + ':' md5(A2))
                                             000000     150300
     5338 C*  A1 = username + ':' + realm + ':' + passwd
                                              000000     150400
     5339 C*  A2 = method + ':' + uri
                                             000000     150500
     5340 C*
                                              000000     150600
     5341 C*  realm = passed from server
                                              000000     150700
     5342 C*  nonce = passed from server
                                              000000     150800
     5343 C*  nc = count of uses of nonce so far
                                              000000     150900
     5344 C*  qop = auth (if that's a choice on this server)
                                              000000     151000
     5345 C*  cnonce = 8-char hex string that we make up
                                              000000     151100
     5346 C*  opaque = passed by server
                                             000000     151200
     5347 C*  method = GET or POST
                                              000000     151300
     5348 C*  username & password are supplied by the user
                                              000000     151400
     5349 C*  we should know the URI when the request is made
                                             000000     151500
     5350
                                             000000     151600
     5351  * FIXME: This CNonce ("client nonce") should be different
                                              000000     151700
     5352  *    with every request, not a fixed string.
                                             000000     151800
     5353 c                   eval      dsAuthCNonce = '7248e2a3711545e8'
                                             000000     151900
     5354 c                   eval      dsAuthNC = dsAuthNC + 1
                                             000000     152000
     5355
                                             000000     152100
     5356 c                   eval      wwWork = %trim(dsAuthUser) + ':'
   +                                          000000     152200
     5357 c                                      %trim(dsAuthRealm) + ':'
   +                                         000000     152300
     5358 c                                      %trim(dsAuthPasswd)
                                              000000     152400
     5359 c                   if
   md5(%addr(wwWork)+2:%len(wwWork):wwA1)                            B01
         000000     152500
     5360 c                              = *OFF
                                   B01       000000     152600
     5361 c                   return    '*error'
                                     01       000000     152700
     5362 c                   endif
                                   E01       000000     152800
     5363
                                             000000     152900
     5364 c                   eval      wwWork = %trim(peMethod) + ':' +
                                              000000     153000
     5365 c                                      %trim(peURI)
                                             000000     153100
     5366 c                   if
   md5(%addr(wwWork)+2:%len(wwWork):wwA2)                            B01
         000000     153200
     5367 c                              = *OFF
                                   B01       000000     153300
     5368 c                   return    '*error'
                                     01       000000     153400
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   100
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5369 c                   endif
                                   E01       000000     153500
     5370
                                             000000     153600
     5371 c                   if        %scan('auth': dsAuthQop) > 0
                                    B01       000000     153700
     5372 c                   eval      wwWork = wwA1 + ':' +
                                    01       000000     153800
     5373 c                                      %trim(dsAuthNonce) + ':'
   +                                01       000000     153900
     5374 c                                      '0'+%editc(dsAuthNC:'X')
   + ':' +                          01       000000     154000
     5375 c                                      dsAuthCnonce + ':' +
                                    01       000000     154100
     5376 c                                      'auth' + ':' +
                                    01       000000     154200
     5377 c                                      wwA2
                                    01       000000     154300
     5378 c                   else
                                    X01       000000     154400
     5379 c                   eval      wwWork = wwA1 + ':' +
                                    01       000000     154500
     5380 c                                      %trim(dsAuthNonce) + ':'
   +                                01       000000     154600
     5381 c                                      wwA2
                                    01       000000     154700
     5382 c                   endif
                                   E01       000000     154800
     5383
                                             000000     154900
     5384 c                   if
   md5(%addr(wwWork)+2:%len(wwWork):wwResp)                          B01
         000000     155000
     5385 c                              = *OFF
                                   B01       000000     155100
     5386 c                   return    '*error'
                                     01       000000     155200
     5387 c                   endif
                                   E01       000000     155300
     5388
                                             000000     155400
     5389 c                   eval      wwRet =
                                             000000     155500
     5390 c                               'username="'
   +%trim(dsAuthUser)+ '", '+                                   000000
     155600
     5391 c                               'realm="' +%trim(dsAuthRealm)+
   '", '+                                     000000     155700
     5392 c                               'nonce="' +%trim(dsAuthNonce)+
   '", '+                                     000000     155800
     5393 c                               'uri="' +%trim(peURI)+ '", '+
                                             000000     155900
     5394 c                               'response="' + wwResp + '"'
                                             000000     156000
     5395
                                             000000     156100
     5396 c                   if        %scan('auth': dsAuthQop) > 0
                                    B01       000000     156200
     5397 c                   eval      wwRet = %trimr(wwRet) + ', ' +
                                     01       000000     156300
     5398 c                               'algorithm=MD5, ' +
                                    01       000000     156400
     5399 c                               'nc=0' + %editc(dsAuthNC:'X') +
   ', ' +                           01       000000     156500
     5400 c                               'cnonce="' + dsAuthCNonce +'",
   ' +                               01       000000     156600
     5401 c                               'qop="auth"'
                                     01       000000     156700
     5402 c                   endif
                                   E01       000000     156800
     5403
                                             000000     156900
     5404 c                   if        dsAuthOpaque <> *blanks
                                   B01       000000     157000
     5405 c                   eval      wwRet = %trimr(wwRet) + ', ' +
                                     01       000000     157100
     5406 c                                 'opaque="' +
   %trim(dsAuthOpaque)+'"'                           01       000000
   157200
     5407 c                   endif
                                   E01       000000     157300
     5408
                                             000000     157400
     5409 c                   return    wwRet
                                             000000     157500
     5410 P                 E
                                             000000     157600
     5411
                                             000000     157700
     5412
                                             000000     157800
     5413
   P*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                      000000     157900
     5414 P* Interpret (parse & save) the WWW-Authenticate: header
                                              000000     158000
     5415
   P*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                      000000     158100
     5416 P interpret_auth  B
                                             000000     158200
     5417 D interpret_auth  PI
                                              000000     158300
     5418 D   peRespChain               2048A   const
                                             000000     158400
     5419 D   peKwdPos                    10I 0 value
                                             000000     158500
     5420
                                             000000     158600
     5421 D wwCh            S              1A
                                             000000     158700
     5422 D wwAuth          S           2048A
                                             000000     158800
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   101
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5423 D wwPos1          S             10I 0
                                             000000     158900
     5424 D wwPos2          S             10I 0
                                             000000     159000
     5425 D wwLen           S             10I 0
                                             000000     159100
     5426 D p_Word          S               *
                                             000000     159200
     5427 D p_Next          S               *
                                             000000     159300
     5428 D wwWord          S             30A
                                             000000     159400
     5429 D TAB             C                   CONST(x'05')
                                              000000     159500
     5430 D wwOrigNonce     S            128A
                                             000000     159600
     5431 D LF              S              1A   inz(x'25') static
                                             000000     159700
     5432
                                             000000     159800
     5433 d strtok          PR              *   extproc('strtok')
                                             000000     159900
     5434 d   nextpos                       *   value
                                             000000     160000
     5435 d   delim                         *   value options(*string)
                                              000000     160100
     5436
                                             000000     160200
     5437 c                   callp     debug_msg('interpret_auth():
   entered')                                      000000     160300
     5438 c                   eval      wwOrigNonce = dsAuthNonce
                                             000000     160400
     5439 c                   eval      dsAuthBasic = *OFF
                                              000000     160500
     5440 c                   eval      dsAuthDigest = *OFF
                                             000000     160600
     5441 c                   eval      dsAuthDigest = *OFF
                                             000000     160700
     5442 c                   eval      dsAuthRealm = *blanks
                                             000000     160800
     5443 c                   eval      dsAuthNonce = *blanks
                                             000000     160900
     5444 c                   eval      dsAuthOpaque = *blanks
                                              000000     161000
     5445 c                   eval      dsAuthQOP = *blanks
                                             000000     161100
     5446 c                   eval      dsAuthCNonce = *blanks
                                              000000     161200
     5447
                                             000000     161300
     5448 C*********************************************************
                                              000000     161400
     5449 C* extract the value of this keyword (and nothing else)
                                             000000     161500
     5450 C*********************************************************
                                              000000     161600
     5451 c                   eval      wwPos1
   =%scan(':':peRespChain:peKwdPos+1)
   000000     161700
     5452 c                   eval      peKwdPos = wwPos1 + 1
                                             000000     161800
     5453
                                             000000     161900
     5454 c                   dou       wwCh<>' ' and wwCh<>TAB
                                   B01       000000     162000
     5455 c                   eval      wwPos2 = %scan(LF: peRespChain:
                                    01       000000     162100
     5456 c                                            wwPos1)
                                     01       000000     162200
     5457 c                   if        wwPos2 < wwPos1
                                   B02       000000     162300
     5458 c                   leave
                                    02       000000     162400
     5459 c                   endif
                                   E02       000000     162500
     5460 c                   eval      wwPos1 = wwPos2
                                    01       000000     162600
     5461 c                   eval      wwCh =
   %subst(peRespChain:wwPos2+1:1)                              01
   000000     162700
     5462 c                   enddo
                                   E01       000000     162800
     5463
                                             000000     162900
     5464 c                   if        wwPos1 < peKwdPos
                                   B01       000000     163000
     5465 C*             shouldn't happen
                                             000000     163100
     5466 c                   return
                                     01       000000     163200
     5467 c                   endif
                                   E01       000000     163300
     5468
                                             000000     163400
     5469 c                   eval      wwLen = (wwPos1 - peKwdPos) + 1
                                             000000     163500
     5470 c                   eval      wwAuth = %subst( peRespChain:
                                             000000     163600
     5471 c                                              peKwdPos: wwLen)
   + x'00'                                   000000     163700
     5472 c                   eval      p_Next = %addr(wwAuth)
                                              000000     163800
     5473
                                             000000     163900
     5474 C*********************************************************
                                              000000     164000
     5475 C* Extract one word at a time from the list.  If the word
                                             000000     164100
     5476 C* is something we can use, save it's value to our DS
                                             000000     164200
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   102
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5477 C*********************************************************
                                              000000     164300
     5478 c                   dow       1 = 1
                                   B01       000000     164400
     5479
                                             000000     164500
     5480 c                   eval      p_Word = strtok(p_Next: '
   =,'+TAB)                                 01       000000     164600
     5481 c                   if        p_Word = *NULL
                                    B02       000000     164700
     5482 c                   leave
                                    02       000000     164800
     5483 c                   endif
                                   E02       000000     164900
     5484 c                   eval      p_Next = *NULL
                                     01       000000     165000
     5485
                                             000000     165100
     5486 c                   eval      wwWord = %str(p_Word)
                                    01       000000     165200
     5487
                                             000000     165300
     5488 c     upper:lower   xlate     wwWord        wwWord
                                     01       000000     165400
     5489
                                             000000     165500
     5490 c                   select
                                    B02       000000     165600
     5491 c                   when      wwWord=*blanks
                                    X02       000000     165700
     5492 c                   iter
                                     02       000000     165800
     5493
                                             000000     165900
     5494 c                   when      wwWord = 'basic'
                                    X02       000000     166000
     5495 c                   eval      dsAuthBasic = *on
                                    02       000000     166100
     5496
                                             000000     166200
     5497 c                   when      wwWord = 'digest'
                                   X02       000000     166300
     5498 c                   eval      dsAuthDigest = *on
                                     02       000000     166400
     5499
                                             000000     166500
     5500 c                   when      wwWord = 'realm'
                                    X02       000000     166600
     5501 c                   eval      p_Word = strtok(*NULL: '"')
                                    02       000000     166700
     5502 c                   if        p_word <> *NULL
                                   B03       000000     166800
     5503 c                   eval      dsAuthRealm = %str(p_word)
                                     03       000000     166900
     5504 c                   endif
                                   E03       000000     167000
     5505
                                             000000     167100
     5506 c                   when      wwWord = 'qop'
                                    X02       000000     167200
     5507 c                   eval      p_Word = strtok(*NULL: '"')
                                    02       000000     167300
     5508 c                   if        p_word <> *NULL
                                   B03       000000     167400
     5509 c                   eval      dsAuthQOP = %str(p_word)
                                     03       000000     167500
     5510 c                   endif
                                   E03       000000     167600
     5511
                                             000000     167700
     5512 c                   when      wwWord = 'nonce'
                                    X02       000000     167800
     5513 c                   eval      p_Word = strtok(*NULL: '"')
                                    02       000000     167900
     5514 c                   if        p_word <> *NULL
                                   B03       000000     168000
     5515 c                   eval      dsAuthNonce = %str(p_word)
                                     03       000000     168100
     5516 c                   if        wwOrigNonce <> dsAuthNonce
                                    B04       000000     168200
     5517 c                   eval      dsAuthNC = 0
                                     04       000000     168300
     5518 c                   endif
                                   E04       000000     168400
     5519 c                   endif
                                   E03       000000     168500
     5520
                                             000000     168600
     5521 c                   when      wwWord = 'opaque'
                                   X02       000000     168700
     5522 c                   eval      p_Word = strtok(*NULL: '"')
                                    02       000000     168800
     5523 c                   if        p_word <> *NULL
                                   B03       000000     168900
     5524 c                   eval      dsAuthOpaque = %str(p_word)
                                    03       000000     169000
     5525 c                   endif
                                   E03       000000     169100
     5526 c                   endsl
                                   E02       000000     169200
     5527
                                             000000     169300
     5528 c                   enddo
                                   E01       000000     169400
     5529
                                             000000     169500
     5530 c                   return
                                              000000     169600
     5531 P                 E
                                             000000     169700
     5532
                                             000000     169800
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   103
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5533
   P*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                      000000     169900
     5534 P* Interpret (parse & save) the Proxy-Authenticate: header
                                              000000     170000
     5535
   P*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                      000000     170100
     5536 P interpret_proxy_auth...
                                             000000     170200
     5537 P                 B
                                             000000     170300
     5538 D interpret_proxy_auth...
                                             000000     170400
     5539 D                 PI
                                              000000     170500
     5540 D   peRespChain               2048A   const
                                             000000     170600
     5541 D   peKwdPos                    10I 0 value
                                             000000     170700
     5542
                                             000000     170800
     5543 D wwCh            S              1A
                                             000000     170900
     5544 D wwAuth          S           2048A
                                             000000     171000
     5545 D wwPos1          S             10I 0
                                             000000     171100
     5546 D wwPos2          S             10I 0
                                             000000     171200
     5547 D wwLen           S             10I 0
                                             000000     171300
     5548 D TAB             C                   CONST(x'05')
                                              000000     171400
     5549 D LF              S              1A   inz(x'25') static
                                             000000     171500
     5550
                                             000000     171600
     5551 c                   callp
   debug_msg('interpret_proxy_auth(): entered')
        000000     171700
     5552
                                             000000     171800
     5553 C*********************************************************
                                              000000     171900
     5554 C* extract the value of this keyword (and nothing else)
                                             000000     172000
     5555 C*********************************************************
                                              000000     172100
     5556 c                   eval      wwPos1
   =%scan(':':peRespChain:peKwdPos+1)
   000000     172200
     5557 c                   eval      peKwdPos = wwPos1 + 1
                                             000000     172300
     5558
                                             000000     172400
     5559 c                   dou       wwCh<>' ' and wwCh<>TAB
                                   B01       000000     172500
     5560 c                   eval      wwPos2 = %scan(LF: peRespChain:
                                    01       000000     172600
     5561 c                                            wwPos1)
                                     01       000000     172700
     5562 c                   if        wwPos2 < wwPos1
                                   B02       000000     172800
     5563 c                   leave
                                    02       000000     172900
     5564 c                   endif
                                   E02       000000     173000
     5565 c                   eval      wwPos1 = wwPos2
                                    01       000000     173100
     5566 c                   eval      wwCh =
   %subst(peRespChain:wwPos2+1:1)                              01
   000000     173200
     5567 c                   enddo
                                   E01       000000     173300
     5568
                                             000000     173400
     5569 c                   if        wwPos1 < peKwdPos
                                   B01       000000     173500
     5570 C*             shouldn't happen
                                             000000     173600
     5571 c                   return
                                     01       000000     173700
     5572 c                   endif
                                   E01       000000     173800
     5573
                                             000000     173900
     5574 c                   eval      wwLen = (wwPos1 - peKwdPos) + 1
                                             000000     174000
     5575 c                   eval      wwAuth = %subst( peRespChain:
                                             000000     174100
     5576 c                                              peKwdPos: wwLen)
                                             000000     174200
     5577
                                             000000     174300
     5578 C*********************************************************
                                              000000     174400
     5579 C* Check if we deal with basic authentication
                                             000000     174500
     5580 C*********************************************************
                                              000000     174600
     5581 c     upper:lower   xlate     peRespChain   wwAuth
                                              000000     174700
     5582
                                             000000     174800
     5583 c                   eval      wwPos1 = %scan('basic':wwAuth)
                                              000000     174900
     5584 c                   if        wwPos1 > 0
                                    B01       000000     175000
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   104
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5585 c                   eval      dsProxyAuthBasic = *on
                                     01       000000     175100
     5586
                                             000000     175200
     5587 c* Extract the realm, if provided
                                             000000     175300
     5588 c                   eval      wwPos1 = %scan('realm="': wwAuth:
                                    01       000000     175400
     5589 c                                  wwPos1)
                                     01       000000     175500
     5590 c                   if        wwPos1 > 0
                                    B02       000000     175600
     5591 c                   eval      wwPos1 = wwPos1 + 7
                                    02       000000     175700
     5592 c                   eval      wwPos2 = %scan('"': wwAuth:
   wwPos1)                                02       000000     175800
     5593 c                   if        wwPos2 > wwPos1
                                   B03       000000     175900
     5594 c                   eval      wwLen = wwPos2 - wwPos1
                                    03       000000     176000
     5595 c                   eval      dsProxyAuthRealm =
   %subst(peRespChain:                             03       000000
   176100
     5596 c                                  wwPos1: wwLen)
                                    03       000000     176200
     5597 c                   endif
                                   E03       000000     176300
     5598 c                   endif
                                   E02       000000     176400
     5599 c                   endif
                                   E01       000000     176500
     5600
                                             000000     176600
     5601 c                   return
                                              000000     176700
     5602 P                 E
                                             000000     176800
     5603
                                             000000     176900
     5604
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     177000
     5605  *  http_xproc():  Register a procedure to be called back at
                                              000000     177100
     5606  *                 a given exit point
                                             000000     177200
     5607  *
                                              000000     177300
     5608  *     peExitPoint = exit point.  Should be one of the
   constants                                          000000     177400
     5609  *                HTTP_POINT_XXX defined in the HTTPAPI_H
   member                                          000000     177500
     5610  *          peProc = address of procedure to call for this
                                              000000     177600
     5611  *                exit point. (pass *NULL to disable this
   point)                                          000000     177700
     5612  *      peUserData = Pointer to user data. This will be passed
                                              000000     177800
     5613  *                to your call-back procedure. You can set it
   to                                          000000     177900
     5614  *                *NULL if you don't need/want it.
                                              000000     178000
     5615  *
                                              000000     178100
     5616  *  Returns -1 upon error, or 0 if successful
                                             000000     178200
     5617
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     178300
     5618 P http_xproc      B                   export
                                              000000     178400
     5619 D http_xproc      PI            10I 0
                                             000000     178500
     5620 D  peExitPoint                  10I 0 value
                                             000000     178600
     5621 D  peProc                         *   procptr value
                                             000000     178700
     5622 D  peUserData                     *   value options(*nopass)
                                              000000     178800
     5623
                                             000000     178900
     5624 D wwUserData      s               *   inz(*NULL)
                                              000000     179000
     5625
                                             000000     179100
     5626 c                   if        %parms >= 3
                                   B01       000000     179200
     5627 c                   eval      wwUserData = peUserData
                                    01       000000     179300
     5628 c                   endif
                                   E01       000000     179400
     5629
                                             000000     179500
     5630 c                   select
                                    B01       000000     179600
     5631 c                   when      peExitPoint = HTTP_POINT_DEBUG
                                    X01       000000     179700
     5632 c                   callp     debug_setproc(peProc: wwUserData)
                                    01       000000     179800
     5633 c                   when      peExitPoint =
   HTTP_POINT_UPLOAD_STATUS                            X01       000000
     179900
     5634 c                   eval      wkUplProc = peProc
                                     01       000000     180000
     5635 c                   eval      wkUplUData = wwUserData
                                    01       000000     180100
     5636 c                   when      peExitPoint =
   HTTP_POINT_DOWNLOAD_STATUS                          X01       000000
     180200
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   105
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5637 c                   eval      wkDwnlProc = peProc
                                    01       000000     180300
     5638 c                   eval      wkDwnlUData = wwUserData
                                     01       000000     180400
     5639 c                   when      peExitPoint =
   HTTP_POINT_ADDL_HEADER                              X01       000000
     180500
     5640 c                   eval      wkAddHdrProc = peProc
                                    01       000000     180600
     5641 c                   eval      wkAddHdrData = wwUserData
                                    01       000000     180700
     5642 c                   when      peExitPoint =
   HTTP_POINT_PARSE_HEADER                             X01       000000
     180800
     5643 c                   eval      wkParseHdrProc = peProc
                                    01       000000     180900
     5644 c                   eval      wkParseHdrData = wwUserData
                                    01       000000     181000
     5645 c                   when      peExitPoint =
   HTTP_POINT_PARSE_HDR_LONG                           X01       000000
     181100
     5646 c                   eval      wkParseHdrLong = peProc
                                    01       000000     181200
     5647 c                   eval      wkParseHdrLongData = wwUserData
                                    01       000000     181300
     5648 c                   when      peExitPoint =
   HTTP_POINT_PARSE_HDR_LONG                           X01       071218
     181400
     5649 c                   eval      wkParseHdrLong = peProc
                                    01       071218     181500
     5650 c                   eval      wkParseHdrLongData = wwUserData
                                    01       071218     181600
     5651  /if defined(HAVE_SSLAPI)
                                             071218     181700
     5652 c                   when      peExitPoint = HTTP_POINT_CERT_VAL
                                   X01       071218     181800
     5653 c                   callp     commssl_setxproc( peExitPoint
                                    01       071218     181900
     5654 c                                             : peProc
                                     01       071218     182000
     5655 c                                             : wwUserData )
                                     01       071218     182100
     5656 c                   when      peExitPoint =
   HTTP_POINT_GSKIT_CERT_VAL                           X01       071218
     182200
     5657 c                   callp     commssl_setxproc( peExitPoint
                                    01       071218     182300
     5658 c                                             : peProc
                                     01       071218     182400
     5659 c                                             : wwUserData )
                                     01       071218     182500
     5660  /endif
                                             071218     182600
     5661 c                   other
                                   X01       000000     182700
     5662 c                   callp     SetError(HTTP_BADPNT: 'Invalid
   exit ' +                            01       000000     182800
     5663 c                               'point!')
                                    01       000000     182900
     5664 c                   return    -1
                                     01       000000     183000
     5665 c                   endsl
                                   E01       000000     183100
     5666
                                             000000     183200
     5667 c                   return    0
                                             000000     183300
     5668 P                 E
                                             000000     183400
     5669
                                             000000     183500
     5670
                                             000000     183600
     5671
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     183700
     5672  * http_redir_loc(): Retrieve location provided by a redirect
                                             000000     183800
     5673  *   request.
                                             000000     183900
     5674  *
                                              000000     184000
     5675  *  returns redirect location, or '' if no redirect was given
                                             000000     184100
     5676
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     184200
     5677 P http_redir_loc  B                   export
                                              000000     184300
     5678 D http_redir_loc  PI          1024A   varying
                                             000000     184400
     5679 c                   return    wkRedirLoc
                                              000000     184500
     5680 P                 E
                                             000000     184600
     5681
                                             000000     184700
     5682
                                             000000     184800
     5683
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     184900
     5684  *  http_long_ParseURL(): Parse URL into it's component parts
                                             000000     185000
     5685  *
                                              000000     185100
     5686  *  Breaks a uniform resource locator (URL) into it's component
                                             000000     185200
     5687  *  pieces for use with the http: or https: protocols.  (would
   also                                       000000     185300
     5688  *  work for FTP with minor tweaks)
                                             000000     185400
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   106
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5689  *
                                              000000     185500
     5690  *  peURL = URL that needs to be parsed.
                                              000000     185600
     5691  *  peService = service name from URL (i.e. http or https)
                                              000000     185700
     5692  *  peUserName = user name given, or *blanks
                                              000000     185800
     5693  *  pePassword = password given, or *blanks
                                             000000     185900
     5694  *  peHost = hostname given in URL. (could be domain name or
   IP)                                          000000     186000
     5695  *  pePort = port number to connect to, if specified, otherwise
   0.                                        000000     186100
     5696  *  pePath = remaining path/request for server.
                                             000000     186200
     5697  *
                                              000000     186300
     5698  *  returns -1 upon failure, or 0 upon success
                                              000000     186400
     5699
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     186500
     5700 P http_long_ParseURL...
                                             000000     186600
     5701 P                 B                   export
                                              000000     186700
     5702 d http_long_ParseURL...
                                             000000     186800
     5703 D                 PI            10I 0
                                             000000     186900
     5704 D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   187000
     5705 D  peService                    32A
                                             000000     187100
     5706 D  peUserName                   32A
                                             000000     187200
     5707 D  pePassword                   32A
                                             000000     187300
     5708 D  peHost                      256A
                                             000000     187400
     5709 D  pePort                       10I 0
                                             000000     187500
     5710 D  pePath                    32767A   varying
                                             000000     187600
     5711
                                             000000     187700
     5712 D wwLen           S             10I 0
                                             000000     187800
     5713 D wwURL           S          32767A   varying
                                             000000     187900
     5714 D wwTemp          S             65A
                                             000000     188000
     5715 D wwPos           S             10I 0
                                             000000     188100
     5716 D wwRChk          S              4A
                                             000000     188200
     5717
                                             000000     188300
     5718 D wwRelOk         s              1N   inz(*OFF)    static
                                             000000     188400
     5719 D wwLastRel       s                   like(wwURL)  static
                                             000000     188500
     5720 D wwLastPath      s                   like(pePath) static
                                             000000     188600
     5721
                                             000000     188700
     5722 c                   callp     debug_msg('http_long_ParseURL():
   ' +                                        000000     188800
     5723 c                                       'entered')
                                              000000     188900
     5724
                                             000000     189000
     5725 c                   eval      peService = *Blanks
                                             000000     189100
     5726 c                   eval      peUserName = *blanks
                                              000000     189200
     5727 c                   eval      pePassword = *blanks
                                              000000     189300
     5728 c                   eval      peHost = *blanks
                                              000000     189400
     5729 c                   eval      pePort = 0
                                              000000     189500
     5730 c                   eval      pePath = *blanks
                                              000000     189600
     5731 c                   eval      wwURL = peURL
                                             000000     189700
     5732
                                             000000     189800
     5733
   ****************************************************************
                                     000000     189900
     5734  * If this is a relative URL and we have a host & path saved
                                              000000     190000
     5735  * from a previous URL, convert it from a relative to an
                                              000000     190100
     5736  * absolute URL.
                                              000000     190200
     5737
   ****************************************************************
                                     000000     190300
     5738 c                   if        wwRelOk = *ON
                                   B01       000000     190400
     5739 c                               and %scan('://': peURL) = 0
                                   B01       000000     190500
     5740
                                             000000     190600
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   107
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5741 c                   callp     debug_msg('Converting relative
   URL.')                              01       000000     190700
     5742
                                             000000     190800
     5743 c                   if        %subst(peURL:1:1) = '/'
                                   B02       000000     190900
     5744 c                   eval      wwURL = wwLastRel + peURL
                                    02       000000     191000
     5745 c                   else
                                    X02       000000     191100
     5746 c                   eval      wwURL = wwLastRel + wwLastPath
                                     02       000000     191200
     5747 c                                   + peURL
                                    02       000000     191300
     5748 c                   endif
                                   E02       000000     191400
     5749
                                             000000     191500
     5750 c                   callp     debug_msg('New URL is ' + wwURL)
                                     01       000000     191600
     5751
                                             000000     191700
     5752 c                   endif
                                   E01       000000     191800
     5753
                                             000000     191900
     5754
   C****************************************************************
                                       000000     192000
     5755 C*  A valid HTTP url should look like:
                                              000000     192100
     5756 C*      [8]http://www.server.com/somedir/somefile.ext
                                                000000     192200
     5757 C*     [9]https://www.server.com/somedir/somefile.ext
                                                000000     192300
     5758 C*
                                              000000     192400
     5759 C*  and may optionally contain a user name, password & port
   number:                                       000000     192500
     5760 C*
                                              000000     192600
     5761 C*
   [10]http://user:passwd@xxxxxxxxxxxxxx:80/somedir/somefile.ext
                                    000000     192700
     5762
   C****************************************************************
                                       000000     192800
     5763
                                             000000     192900
     5764 C* First, extract the URL's "scheme" (which in the case of http
                                             000000     193000
     5765 C*  is the service's name as well):
                                             000000     193100
     5766 c                   eval      wwPos = %scan(':': wwURL)
                                             000000     193200
     5767 c                   if        wwPos < 2 or wwPos >
   (%len(wwURL)-1)                              B01       000000
   193300
     5768 c                   callp     SetError(HTTP_BADURL:'Relative
   URLs '+                             01       000000     193400
     5769 c                              'are not supported!')
                                     01       000000     193500
     5770 c                   return    -1
                                     01       000000     193600
     5771 c                   endif
                                   E01       000000     193700
     5772
                                             000000     193800
     5773 c                   eval      peService =
   %subst(wwURL:1:wwPos-1)                                         000000
       193900
     5774 c                   eval      wwURL = %subst(wwURL:wwPos+1)
                                             000000     194000
     5775 c     upper:lower   xlate     peService     peService
                                             000000     194100
     5776
                                             000000     194200
     5777  /if defined(HAVE_SSLAPI)
                                             000000     194300
     5778 c                   if        peService<>'http' and
   peService<>'https'                          B01       000000
   194400
     5779 c                   callp     SetError(HTTP_BADURL:'Only the
   http and'+                          01       000000     194500
     5780 c                              ' https protocols are
   available!')                                01       000000     194600
     5781 c                   return    -1
                                     01       000000     194700
     5782 c                   endif
                                   E01       000000     194800
     5783  /else
                                              000000     194900
               LINES EXCLUDED: 5
     5784  /endif
                                             000000     195500
     5785
                                             000000     195600
     5786 C* now the URL should be //www.server.com/mydir/somefile.ext!
                                             000000     195700
     5787 C*   make sure it does start with the //, and strip that off.
                                             000000     195800
     5788
                                             000000     195900
     5789 c                   if        %subst(wwURL:1:2) <> '//'
                                   B01       000000     196000
     5790 c                   callp     SetError(HTTP_BADURL:'Relative
   URLs '+                             01       000000     196100
     5791 c                              'are not supported!')
                                     01       000000     196200
     5792 c                   return    -1
                                     01       000000     196300
     5793 c                   endif
                                   E01       000000     196400
     5794
                                             000000     196500
     5795 c                   eval      wwURL = %subst(wwURL:3)
                                             000000     196600
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   108
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5796
                                             000000     196700
     5797 C* now, either everything up to the first '/' is part of the
                                              000000     196800
     5798 C*  host name, or the entire string is a hostname.
                                              000000     196900
     5799
                                             000000     197000
     5800 c                   eval      wwPos = %scan('/': wwURL)
                                             000000     197100
     5801 c                   if        wwPos = 0
                                   B01       000000     197200
     5802 c                   eval      wwPos = %len(wwURL) + 1
                                    01       000000     197300
     5803 c                   endif
                                   E01       000000     197400
     5804
                                             000000     197500
     5805 c                   eval      peHost = %subst(wwURL:1:wwPos-1)
                                              000000     197600
     5806 c                   if        wwPos > %len(wwURL)
                                   B01       000000     197700
     5807 c                   eval      wwURL = ''
                                     01       000000     197800
     5808 c                   else
                                    X01       000000     197900
     5809 c                   eval      wwURL = %subst(wwURL:wwPos)
                                    01       000000     198000
     5810 c                   endif
                                   E01       000000     198100
     5811
                                             000000     198200
     5812 C* the host name may optionally contain a user name,
                                              000000     198300
     5813 C*  and possibly also a password:
                                             000000     198400
     5814 c                   eval      wwPos = %scan('@': peHost)
                                              000000     198500
     5815 c                   if        wwPos > 1 and wwPos <
   %size(peHost)                               B01       000000
   198600
     5816 c                   eval      wwTemp = %subst(peHost:1:wwPos-1)
                                    01       000000     198700
     5817 c                   eval      peHost = %subst(peHost:wwPos+1)
                                    01       000000     198800
     5818 c                   eval      wwPos = %scan(':': wwTemp)
                                     01       000000     198900
     5819 c                   if        wwPos > 1 and wwPos <
   %size(wwTemp)                               B02       000000
   199000
     5820 c                   eval      peUserName =
   %subst(wwTemp:1:wwPos-1)                              02       000000
       199100
     5821 c                   eval      pePassword =
   %subst(wwTemp:wwPos+1)                                02       000000
       199200
     5822 c                   else
                                    X02       000000     199300
     5823 c                   eval      peUserName = wwTemp
                                    02       000000     199400
     5824 c                   endif
                                   E02       000000     199500
     5825 c                   endif
                                   E01       000000     199600
     5826
                                             000000     199700
     5827 C* the host name may also specify a port number:
                                              000000     199800
     5828 c                   eval      wwPos = %scan(':': peHost)
                                              000000     199900
     5829 c                   if        wwPos > 1 and wwPos <
   %size(peHost)                               B01       000000
   200000
     5830 c                   eval      wwTemp = %subst(peHost:wwPos+1)
                                    01       000000     200100
     5831 c                   eval      peHost = %subst(peHost:1:wwPos-1)
                                    01       000000     200200
     5832 c                   eval      pePort = atoi(%trimr(wwTemp))
                                    01       000000     200300
     5833 c                   endif
                                   E01       000000     200400
     5834
                                             000000     200500
     5835 c* After all that, do we still have a hostname?
                                             000000     200600
     5836 c                   if        peHost=*blanks
                                    B01       000000     200700
     5837 c                   callp     SetError(HTTP_BADURL:'URL does
   not'+                               01       000000     200800
     5838 c                              ' contain a hostname!')
                                     01       000000     200900
     5839 c                   return    -1
                                     01       000000     201000
     5840 c                   endif
                                   E01       000000     201100
     5841
                                             000000     201200
     5842 C* Whatever is left should now be the pathname to the file
   itself.                                        000000     201300
     5843 C* (or is a parameter or query string for a CGI script)
                                             000000     201400
     5844 c                   eval      pePath = wwURL
                                              000000     201500
     5845 c                   if        %len(pePath)<1 or pePath=*blanks
                                    B01       000000     201600
     5846 c                   eval      pePath = '/'
                                     01       000000     201700
     5847 c                   endif
                                   E01       000000     201800
     5848
                                             000000     201900
     5849  *
                                              000000     202000
     5850  * Save information about this URL so that we can use it to
                                             000000     202100
     5851  * figure out subsequent "relative" URLs.
                                             000000     202200
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   109
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5852  *
                                              000000     202300
     5853 c                   eval      wwLastRel = %trimr(peService) +
   '://'                                       000000     202400
     5854 c                   if        peUserName <> *blanks
                                   B01       000000     202500
     5855 c                   eval      wwLastRel = wwLastRel
                                    01       000000     202600
     5856 c                                       + %trim(peUserName)
                                    01       000000     202700
     5857 c                   if        pePassword <> *blanks
                                   B02       000000     202800
     5858 c                   eval      wwLastRel = wwLastRel + ':'
                                    02       000000     202900
     5859 c                                       + %trim(pePassword)
                                    02       000000     203000
     5860 c                   endif
                                   E02       000000     203100
     5861 c                   eval      wwLastRel = wwLastRel + '@'
                                    01       000000     203200
     5862 c                   endif
                                   E01       000000     203300
     5863 c                   eval      wwLastRel = wwLastRel +
   %trim(peHost)                                       000000     203400
     5864 c                   if        pePort <> 0
                                   B01       000000     203500
     5865 c                   eval      wwLastRel = wwLastRel + ':'
                                    01       000000     203600
     5866 c                                       +
   %trim(%editc(pePort:'Z'))                              01       000000
       203700
     5867 c                   endif
                                   E01       000000     203800
     5868
                                             000000     203900
     5869 c                   eval      wwPos = %len(pePath)
                                              070828     204000
     5870 c                   dou       wwPos <= 1
                                    B01       070828     204100
     5871 c                   if        %subst(pePath:wwPos:1) = '/'
                                    B02       000000     204200
     5872 c                   eval      wwLastPath =
   %subst(pePath:1:wwPos)                                02       000000
       204300
     5873 c                   leave
                                    02       000000     204400
     5874 c                   endif
                                   E02       000000     204500
     5875 c                   eval      wwPos = wwPos -1
                                     01       070828     204600
     5876 c                   enddo
                                   E01       070828     204700
     5877
                                             000000     204800
     5878 c                   eval      wwRelOk = *ON
                                             000000     204900
     5879
                                             000000     205000
     5880 c                   return    0
                                             000000     205100
     5881 P                 E
                                             000000     205200
     5882
                                             000000     205300
     5883
                                             000000     205400
     5884
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     205500
     5885  *  http_url_get(): Retrieve an HTTP document (to a file)
                                             000000     205600
     5886  *
                                              000000     205700
     5887  *       peURL = url to grab  (i.e.
   [11]http://www.blah.com/dir/file.txt)
       000000     205800
     5888  *  peFilename = Filename (in IFS) to save file into
                                              000000     205900
     5889  *  peTimeout  = (optional) give up if no data is received for
                                              000000     206000
     5890  *          this many seconds.
                                              000000     206100
     5891  *  peModTime  = (optiona) only get file if it was changed
   since                                          000000     206200
     5892  *          this timestamp.
                                             000000     206300
     5893  *  peContentType = (optional) content type to supply (mainly
                                             000000     206400
     5894  *          useful when talking to CGI scripts)
                                             000000     206500
     5895  *
                                              000000     206600
     5896  *  Returns  -1 upon failure, 0 upon timeout
                                              000000     206700
     5897  *            1 for success, or an HTTP response code
                                             000000     206800
     5898
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     206900
     5899 P http_url_get    B                   export
                                              000000     207000
     5900 D http_url_get    PI            10I 0
                                             000000     207100
     5901 D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   207200
     5902 D  peFilename                32767A   varying const
   options(*varsize)                                     000000
   207300
     5903 D  peTimeout                    10I 0 value options(*nopass)
                                              000000     207400
     5904 D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
     207500
     5905 D  peModTime                      Z   const
   options(*nopass:*omit)                                        000000
     207600
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   110
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5906 D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
     207700
     5907 D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
     207800
     5908
                                             000000     207900
     5909 D wwFD            S             10I 0
                                             000000     208000
     5910 D rc              S             10I 0
                                             000000     208100
     5911
                                             000000     208200
     5912 c                   callp     debug_msg('http_url_get():
   entered')                                        000000     208300
     5913
                                             000000     208400
     5914  *********************************************************
                                              000000     208500
     5915  * open file for writing (O_WRONLY = write only)
                                              000000     208600
     5916  *    if it exists, truncate it (O_TRUNC = truncate)
                                              000000     208700
     5917  *    if it doesnt, create it (O_CREAT = create)
                                              000000     208800
     5918  *    and assign the ASCII codepage to it.
                                              000000     208900
     5919  *********************************************************
                                              000000     209000
     5920 c                   eval      wwFD = open(%trimr(peFilename):
                                             000000     209100
     5921 c
   O_WRONLY+O_TRUNC+O_CREAT+CCSID_OR_CP:
         000000     209200
     5922 c                             HTTP_IFSMODE: FILE_CCSID)
                                             000000     209300
     5923 c                   if        wwFD < 0
                                    B01       000000     209400
     5924 c                   callp     SetError(HTTP_FDOPEN:'open(): ' +
                                    01       000000     209500
     5925 c                               %str(strerror(errno)) )
                                    01       000000     209600
     5926 c                   return    -1
                                     01       000000     209700
     5927 c                   endif
                                   E01       000000     209800
     5928
                                             000000     209900
     5929  *********************************************************
                                              000000     210000
     5930  *  Call the 'raw' get procedure, telling it to use
                                             000000     210100
     5931  *  the IFS API called 'write' to write data.
                                             000000     210200
     5932  *********************************************************
                                              000000     210300
     5933 c                   select
                                    B01       000000     210400
     5934 c                   when      %parms < 3
                                    X01       000000     210500
     5935 c                   eval      rc = http_url_get_raw(peURL:
   wwFD:                                 01       000000     210600
     5936 c                               %paddr('write'))
                                     01       000000     210700
     5937 c                   when      %parms < 4
                                    X01       000000     210800
     5938 c                   eval      rc = http_url_get_raw(peURL:
   wwFD:                                 01       000000     210900
     5939 c                               %paddr('write'): peTimeout)
                                    01       000000     211000
     5940 c                   when      %parms < 5
                                    X01       000000     211100
     5941 c                   eval      rc = http_url_get_raw(peURL:
   wwFD:                                 01       000000     211200
     5942 c                               %paddr('write'): peTimeout:
                                    01       000000     211300
     5943 c                               peUserAgent)
                                     01       000000     211400
     5944 c                   when      %parms < 6
                                    X01       000000     211500
     5945 c                   eval      rc = http_url_get_raw(peURL:
   wwFD:                                 01       000000     211600
     5946 c                               %paddr('write'): peTimeout:
                                    01       000000     211700
     5947 c                               peUserAgent: peModTime)
                                    01       000000     211800
     5948 c                   when      %parms < 7
                                    X01       000000     211900
     5949 c                   eval      rc = http_url_get_raw(peURL:
   wwFD:                                 01       000000     212000
     5950 c                               %paddr('write'): peTimeout:
                                    01       000000     212100
     5951 c                               peUserAgent: peModTime:
   peContentType)                           01       000000     212200
     5952 c                   other
                                   X01       000000     212300
     5953 c                   eval      rc = http_url_get_raw(peURL:
   wwFD:                                 01       000000     212400
     5954 c                               %paddr('write'): peTimeout:
                                    01       000000     212500
     5955 c                               peUserAgent: peModTime:
   peContentType:                           01       000000     212600
     5956 c                               peSOAPAction)
                                    01       000000     212700
     5957 c                   endsl
                                   E01       000000     212800
     5958
                                             000000     212900
     5959 c                   callp     close(wwFD)
                                             000000     213000
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   111
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     5960
                                             000000     213100
     5961 c                   return    rc
                                              000000     213200
     5962 P                 E
                                             000000     213300
     5963
                                             000000     213400
     5964
                                             000000     213500
     5965
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     213600
     5966  *  http_url_post(): Post data to CGI script and get document
                                             000000     213700
     5967  *
                                              000000     213800
     5968  *         peURL = url to post to
   ([12]http://www.blah.com/cgi-bin/etc)
         000000     213900
     5969  *    pePostData = pointer to data to post to CGI script.
                                             000000     214000
     5970  * pePostDataLen = length of data to post to CGI script.
                                              000000     214100
     5971  *    peFilename = Filename (in IFS) to save file into
                                              000000     214200
     5972  *    peTimeout  = (optional) give up if no data is received
   for                                          000000     214300
     5973  *            this many seconds.
                                              000000     214400
     5974  * peContentType = (optional) content type to supply (mainly
                                              000000     214500
     5975  *            useful when talking to CGI scripts)
                                             000000     214600
     5976  *
                                              000000     214700
     5977  *  Returns  -1 upon failure, 0 upon timeout,
                                             000000     214800
     5978  *            1 for success, or an HTTP response code
                                             000000     214900
     5979
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     215000
     5980 P http_url_post   B                   export
                                              000000     215100
     5981 D http_url_post   PI            10I 0
                                             000000     215200
     5982 D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   215300
     5983 D  pePostData                     *   value
                                             000000     215400
     5984 D  pePostDataLen                10I 0 value
                                             000000     215500
     5985 D  peFilename                32767A   varying const
   options(*varsize)                                     000000
   215600
     5986 D  peTimeout                    10I 0 value options(*nopass)
                                              000000     215700
     5987 D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
     215800
     5988 D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
     215900
     5989 D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
     216000
     5990
                                             000000     216100
     5991 D wwFD            S             10I 0
                                             000000     216200
     5992 D rc              S             10I 0
                                             000000     216300
     5993
                                             000000     216400
     5994 c                   callp     debug_msg('http_url_post():
   entered')                                       000000     216500
     5995
                                             000000     216600
     5996  *********************************************************
                                              000000     216700
     5997  * open file for writing (O_WRONLY = write only)
                                              000000     216800
     5998  *    if it exists, truncate it (O_TRUNC = truncate)
                                              000000     216900
     5999  *    if it doesnt, create it (O_CREAT = create)
                                              000000     217000
     6000  *    and assign the ASCII codepage to it.
                                              000000     217100
     6001  *********************************************************
                                              000000     217200
     6002 c                   eval      wwFD = open(%trimr(peFilename):
                                             000000     217300
     6003 c
   O_WRONLY+O_TRUNC+O_CREAT+CCSID_OR_CP:
         000000     217400
     6004 c                             HTTP_IFSMODE: FILE_CCSID)
                                             000000     217500
     6005 c                   if        wwFD < 0
                                    B01       000000     217600
     6006 c                   callp     SetError(HTTP_FDOPEN:'open(): ' +
                                    01       000000     217700
     6007 c                               %str(strerror(errno)) )
                                    01       000000     217800
     6008 c                   return    -1
                                     01       000000     217900
     6009 c                   endif
                                   E01       000000     218000
     6010
                                             000000     218100
     6011  *********************************************************
                                              000000     218200
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   112
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6012  *  Call the 'raw' post procedure, telling it to use
                                              000000     218300
     6013  *  the IFS API called 'write' to write data.
                                             000000     218400
     6014  *********************************************************
                                              000000     218500
     6015 c                   select
                                    B01       000000     218600
     6016 c                   when      %parms < 5
                                    X01       000000     218700
     6017 c                   eval      rc = http_url_post_raw(peURL:
                                    01       000000     218800
     6018 c                               pePostData: pePostDataLen:
                                     01       000000     218900
     6019 c                               wwFD: %paddr('write'))
                                     01       000000     219000
     6020 c                   when      %parms < 6
                                    X01       000000     219100
     6021 c                   eval      rc = http_url_post_raw(peURL:
                                    01       000000     219200
     6022 c                               pePostData: pePostDataLen:
                                     01       000000     219300
     6023 c                               wwFD: %paddr('write'):
   peTimeout)                                01       000000     219400
     6024 c                   when      %parms < 7
                                    X01       000000     219500
     6025 c                   eval      rc = http_url_post_raw(peURL:
                                    01       000000     219600
     6026 c                               pePostData: pePostDataLen:
                                     01       000000     219700
     6027 c                               wwFD: %paddr('write'):
   peTimeout:                                01       000000     219800
     6028 c                               peUserAgent)
                                     01       000000     219900
     6029 c                   when      %parms < 8
                                    X01       000000     220000
     6030 c                   eval      rc = http_url_post_raw(peURL:
                                    01       000000     220100
     6031 c                               pePostData: pePostDataLen:
                                     01       000000     220200
     6032 c                               wwFD: %paddr('write'):
   peTimeout:                                01       000000     220300
     6033 c                               peUserAgent: peContentType)
                                    01       000000     220400
     6034 c                   other
                                   X01       000000     220500
     6035 c                   eval      rc = http_url_post_raw(peURL:
                                    01       000000     220600
     6036 c                               pePostData: pePostDataLen:
                                     01       000000     220700
     6037 c                               wwFD: %paddr('write'):
   peTimeout:                                01       000000     220800
     6038 c                               peUserAgent: peContentType:
                                    01       000000     220900
     6039 c                               peSOAPAction)
                                    01       000000     221000
     6040 c                   endsl
                                   E01       000000     221100
     6041
                                             000000     221200
     6042 c                   callp     close(wwFD)
                                             000000     221300
     6043
                                             000000     221400
     6044 c                   return    rc
                                              000000     221500
     6045 P                 E
                                             000000     221600
     6046
                                             000000     221700
     6047
                                             000000     221800
     6048
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     221900
     6049  *  http_url_get_raw(): Retrieve an HTTP document (in raw mode)
                                             000000     222000
     6050  *
                                              000000     222100
     6051  *       peURL = url to grab  (i.e.
   [13]http://www.blah.com/dir/file.txt)
       000000     222200
     6052  *       peFD  = FD to pass back to peProc
                                              000000     222300
     6053  *     peProc  = procedure to call each time data is received.
                                              000000     222400
     6054  *  peTimeout  = (optional) give up if no data is received for
                                              000000     222500
     6055  *          this many seconds.
                                              000000     222600
     6056  *  peModTime  = (optiona) only get file if it was changed
   since                                          000000     222700
     6057  *          this timestamp.
                                             000000     222800
     6058  *  peContentType = (optional) content type to supply (mainly
                                             000000     222900
     6059  *          useful when talking to CGI scripts)
                                             000000     223000
     6060  *
                                              000000     223100
     6061  *  Returns  -1 upon failure, 0 upon timeout, or an HTTP
   response code                                    000000     223200
     6062
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     223300
     6063 P http_url_get_raw...
                                             000000     223400
     6064 P                 B                   export
                                              000000     223500
     6065 D http_url_get_raw...
                                             000000     223600
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   113
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6066 D                 PI            10I 0
                                             000000     223700
     6067 D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   223800
     6068 D  peFD                         10I 0 value
                                             000000     223900
     6069 D  peProc                         *   value procptr
                                             000000     224000
     6070 D  peTimeout                    10I 0 value options(*nopass)
                                              000000     224100
     6071 D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
     224200
     6072 D  peModTime                      Z   const
   options(*nopass:*omit)                                        000000
     224300
     6073 D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
     224400
     6074 D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
     224500
     6075
                                             000000     224600
     6076 D wwComm          s               *
                                             000000     224700
     6077 D rc              s             10I 0
                                             000000     224800
     6078
                                             000000     224900
     6079  *********************************************************
                                              000000     225000
     6080  * Connect.
                                             000000     225100
     6081  *********************************************************
                                              000000     225200
     6082 c                   if        %parms < 4
                                    B01       000000     225300
     6083 c                   eval      wwComm = http_persist_open( peURL
   )                                01       000000     225400
     6084 c                   else
                                    X01       000000     225500
     6085 c                   eval      wwComm = http_persist_open( peURL
                                    01       000000     225600
     6086 c                                                       :
   peTimeout )                            01       000000     225700
     6087 c                   endif
                                   E01       000000     225800
     6088
                                             000000     225900
     6089 c                   if        wwComm = *NULL
                                    B01       000000     226000
     6090 c                   return    -1
                                     01       000000     226100
     6091 c                   endif
                                   E01       000000     226200
     6092
                                             000000     226300
     6093  *********************************************************
                                              000000     226400
     6094  * Get.
                                             000000     226500
     6095  *********************************************************
                                              000000     226600
     6096 c                   select
                                    B01       000000     226700
     6097 c                   when      %parms < 4
                                    X01       000000     226800
     6098 c                   eval      rc = http_persist_get( wwComm
                                    01       000000     226900
     6099 c                                                  : peURL
                                     01       000000     227000
     6100 c                                                  : peFD
                                    01       000000     227100
     6101 c                                                  : peProc )
                                    01       000000     227200
     6102 c                   when      %parms < 5
                                    X01       000000     227300
     6103 c                   eval      rc = http_persist_get( wwComm
                                    01       000000     227400
     6104 c                                                  : peURL
                                     01       000000     227500
     6105 c                                                  : peFD
                                    01       000000     227600
     6106 c                                                  : peProc
                                    01       000000     227700
     6107 c                                                  : peTimeout
   )                                 01       000000     227800
     6108 c                   when      %parms < 6
                                    X01       000000     227900
     6109 c                   eval      rc = http_persist_get( wwComm
                                    01       000000     228000
     6110 c                                                  : peURL
                                     01       000000     228100
     6111 c                                                  : peFD
                                    01       000000     228200
     6112 c                                                  : peProc
                                    01       000000     228300
     6113 c                                                  : peTimeout
                                     01       000000     228400
     6114 c                                                  :
   peUserAgent )                               01       000000     228500
     6115 c                   when      %parms < 7
                                    X01       000000     228600
     6116 c                   eval      rc = http_persist_get( wwComm
                                    01       000000     228700
     6117 c                                                  : peURL
                                     01       000000     228800
     6118 c                                                  : peFD
                                    01       000000     228900
     6119 c                                                  : peProc
                                    01       000000     229000
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   114
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6120 c                                                  : peTimeout
                                     01       000000     229100
     6121 c                                                  :
   peUserAgent                                 01       000000     229200
     6122 c                                                  : peModTime
   )                                 01       000000     229300
     6123 c                   when      %parms < 8
                                    X01       000000     229400
     6124 c                   eval      rc = http_persist_get( wwComm
                                    01       000000     229500
     6125 c                                                  : peURL
                                     01       000000     229600
     6126 c                                                  : peFD
                                    01       000000     229700
     6127 c                                                  : peProc
                                    01       000000     229800
     6128 c                                                  : peTimeout
                                     01       000000     229900
     6129 c                                                  :
   peUserAgent                                 01       000000     230000
     6130 c                                                  : peModTime
                                     01       000000     230100
     6131 c                                                  :
   peContentType )                             01       000000     230200
     6132 c                   other
                                   X01       000000     230300
     6133 c                   eval      rc = http_persist_get( wwComm
                                    01       000000     230400
     6134 c                                                  : peURL
                                     01       000000     230500
     6135 c                                                  : peFD
                                    01       000000     230600
     6136 c                                                  : peProc
                                    01       000000     230700
     6137 c                                                  : peTimeout
                                     01       000000     230800
     6138 c                                                  :
   peUserAgent                                 01       000000     230900
     6139 c                                                  : peModTime
                                     01       000000     231000
     6140 c                                                  :
   peContentType                               01       000000     231100
     6141 c                                                  :
   peSoapAction )                              01       000000     231200
     6142 c                   endsl
                                   E01       000000     231300
     6143
                                             000000     231400
     6144  *********************************************************
                                              000000     231500
     6145  * Disconnect.
                                              000000     231600
     6146  *********************************************************
                                              000000     231700
     6147 c                   callp     http_persist_close( wwComm )
                                              000000     231800
     6148 c                   return    rc
                                              000000     231900
     6149 P                 E
                                             000000     232000
     6150
                                             000000     232100
     6151
                                             000000     232200
     6152
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     232300
     6153  *  http_url_post_raw(): Post data to CGI script and get
   document                                         000000     232400
     6154  *
                                              000000     232500
     6155  *         peURL = url to post to
   ([14]http://www.blah.com/cgi-bin/etc)
         000000     232600
     6156  *    pePostData = pointer to data to post to CGI script.
                                             000000     232700
     6157  * pePostDataLen = length of data to post to CGI script.
                                              000000     232800
     6158  *         peFD  = FD to pass back to peProc
                                              000000     232900
     6159  *       peProc  = procedure to call each time data is
   received.                                          000000     233000
     6160  *    peTimeout  = (optional) give up if no data is received
   for                                          000000     233100
     6161  *            this many seconds.
                                              000000     233200
     6162  * peContentType = (optional) content type to supply (mainly
                                              000000     233300
     6163  *            useful when talking to CGI scripts)
                                             000000     233400
     6164  *
                                              000000     233500
     6165  *  Returns  -1 upon failure, 0 upon timeout, or an HTTP
   response code                                    000000     233600
     6166
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     233700
     6167 P http_url_post_raw...
                                              000000     233800
     6168 P                 B                   export
                                              000000     233900
     6169 D http_url_post_raw...
                                              000000     234000
     6170 D                 PI            10I 0
                                             000000     234100
     6171 D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   234200
     6172 D  pePostData                     *   value
                                             000000     234300
     6173 D  pePostDataLen                10I 0 value
                                             000000     234400
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   115
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6174 D  peFD                         10I 0 value
                                             000000     234500
     6175 D  peProc                         *   value procptr
                                             000000     234600
     6176 D  peTimeout                    10I 0 value options(*nopass)
                                              000000     234700
     6177 D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
     234800
     6178 D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
     234900
     6179 D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
     235000
     6180
                                             000000     235100
     6181 D wwComm          s               *
                                             000000     235200
     6182 D rc              s             10I 0
                                             000000     235300
     6183
                                             000000     235400
     6184  *********************************************************
                                              000000     235500
     6185  * Connect.
                                             000000     235600
     6186  *********************************************************
                                              000000     235700
     6187 c                   if        %parms < 6
                                    B01       000000     235800
     6188 c                   eval      wwComm = http_persist_open( peURL
   )                                01       000000     235900
     6189 c                   else
                                    X01       000000     236000
     6190 c                   eval      wwComm = http_persist_open( peURL
                                    01       000000     236100
     6191 c                                                       :
   peTimeout )                            01       000000     236200
     6192 c                   endif
                                   E01       000000     236300
     6193
                                             000000     236400
     6194 c                   if        wwComm = *NULL
                                    B01       000000     236500
     6195 c                   return    -1
                                     01       000000     236600
     6196 c                   endif
                                   E01       000000     236700
     6197
                                             000000     236800
     6198  *********************************************************
                                              000000     236900
     6199  * Post.
                                              000000     237000
     6200  *********************************************************
                                              000000     237100
     6201 c                   select
                                    B01       000000     237200
     6202 c                   when      %parms < 6
                                    X01       000000     237300
     6203 c                   eval      rc = http_persist_post( wwComm
                                     01       000000     237400
     6204 c                                                   : peURL
                                    01       000000     237500
     6205 c                                                   : 0
                                    01       000000     237600
     6206 c                                                   : *NULL
                                    01       000000     237700
     6207 c                                                   :
   pePostData                                 01       000000     237800
     6208 c                                                   :
   pePostDataLen                              01       000000     237900
     6209 c                                                   : peFD
                                     01       000000     238000
     6210 c                                                   : peProc )
                                     01       000000     238100
     6211
                                             000000     238200
     6212 c                   when      %parms < 7
                                    X01       000000     238300
     6213 c                   eval      rc = http_persist_post( wwComm
                                     01       000000     238400
     6214 c                                                   : peURL
                                    01       000000     238500
     6215 c                                                   : 0
                                    01       000000     238600
     6216 c                                                   : *NULL
                                    01       000000     238700
     6217 c                                                   :
   pePostData                                 01       000000     238800
     6218 c                                                   :
   pePostDataLen                              01       000000     238900
     6219 c                                                   : peFD
                                     01       000000     239000
     6220 c                                                   : peProc
                                     01       000000     239100
     6221 c                                                   : peTimeout
   )                                01       000000     239200
     6222
                                             000000     239300
     6223 c                   when      %parms < 8
                                    X01       000000     239400
     6224 c                   eval      rc = http_persist_post( wwComm
                                     01       000000     239500
     6225 c                                                   : peURL
                                    01       000000     239600
     6226 c                                                   : 0
                                    01       000000     239700
     6227 c                                                   : *NULL
                                    01       000000     239800
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   116
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6228 c                                                   :
   pePostData                                 01       000000     239900
     6229 c                                                   :
   pePostDataLen                              01       000000     240000
     6230 c                                                   : peFD
                                     01       000000     240100
     6231 c                                                   : peProc
                                     01       000000     240200
     6232 c                                                   : peTimeout
                                    01       000000     240300
     6233 c                                                   :
   peUserAgent )                              01       000000     240400
     6234 c
                                    01       000000     240500
     6235
                                             000000     240600
     6236 c                   when      %parms < 9
                                    X01       000000     240700
     6237 c                   eval      rc = http_persist_post( wwComm
                                     01       000000     240800
     6238 c                                                   : peURL
                                    01       000000     240900
     6239 c                                                   : 0
                                    01       000000     241000
     6240 c                                                   : *NULL
                                    01       000000     241100
     6241 c                                                   :
   pePostData                                 01       000000     241200
     6242 c                                                   :
   pePostDataLen                              01       000000     241300
     6243 c                                                   : peFD
                                     01       000000     241400
     6244 c                                                   : peProc
                                     01       000000     241500
     6245 c                                                   : peTimeout
                                    01       000000     241600
     6246 c                                                   :
   peUserAgent                                01       000000     241700
     6247 c                                                   :
   peContentType )                            01       000000     241800
     6248
                                             000000     241900
     6249 c                   when      %parms < 10
                                   X01       000000     242000
     6250 c                   eval      rc = http_persist_post( wwComm
                                     01       000000     242100
     6251 c                                                   : peURL
                                    01       000000     242200
     6252 c                                                   : 0
                                    01       000000     242300
     6253 c                                                   : *NULL
                                    01       000000     242400
     6254 c                                                   :
   pePostData                                 01       000000     242500
     6255 c                                                   :
   pePostDataLen                              01       000000     242600
     6256 c                                                   : peFD
                                     01       000000     242700
     6257 c                                                   : peProc
                                     01       000000     242800
     6258 c                                                   : peTimeout
                                    01       000000     242900
     6259 c                                                   :
   peUserAgent                                01       000000     243000
     6260 c                                                   :
   peContentType                              01       000000     243100
     6261 c                                                   :
   peSOAPAction )                             01       000000     243200
     6262 c                   endsl
                                   E01       000000     243300
     6263
                                             000000     243400
     6264  *********************************************************
                                              000000     243500
     6265  * Disconnect.
                                              000000     243600
     6266  *********************************************************
                                              000000     243700
     6267 c                   callp     http_persist_close( wwComm )
                                              000000     243800
     6268 c                   return    rc
                                              000000     243900
     6269 P                 E
                                             000000     244000
     6270
                                             000000     244100
     6271
                                             000000     244200
     6272
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     244300
     6273  * http_select_commdriver():  Select & initialize
   communications                                          000000
   244400
     6274  *    driver.
                                             000000     244500
     6275  *
                                              000000     244600
     6276  *      peCommType = (input) communications type (http/https)
                                             000000     244700
     6277  *
                                              000000     244800
     6278  * Returns pointer to comm driver, or *NULL upon failure
                                              000000     244900
     6279
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     245000
     6280 P http_select_commdriver...
                                             000000     245100
     6281 P                 B                   export
                                              000000     245200
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   117
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6282 D http_select_commdriver...
                                             000000     245300
     6283 D                 PI              *
                                             000000     245400
     6284 D   peCommType                  32A   const
                                             000000     245500
     6285
                                             000000     245600
     6286 c                   select
                                    B01       000000     245700
     6287 c                   when      peCommType = 'http'
                                   X01       000000     245800
     6288 c                   eval      p_CommNew = %paddr('COMMTCP_NEW')
                                    01       000000     245900
     6289  /if defined(HAVE_SSLAPI)
                                             000000     246000
     6290 c                   when      peCommType = 'https'
                                    X01       000000     246100
     6291 c                   eval      p_CommNew = %paddr('COMMSSL_NEW')
                                    01       000000     246200
     6292  /endif
                                             000000     246300
     6293 c                   other
                                   X01       000000     246400
     6294 c                   callp     SetError( HTTP_NOCDRIV
                                     01       000000     246500
     6295 c                                     : 'No comm driver to
   handle '                              01       000000     246600
     6296 c                                     +  %trimr(peCommType)
                                    01       000000     246700
     6297 c                                     +  ' protocool' )
                                    01       000000     246800
     6298 c                   return    *NULL
                                    01       000000     246900
     6299 c                   endsl
                                   E01       000000     247000
     6300
                                             000000     247100
     6301 c                   eval      p_CommDriver = comm_new
                                             000000     247200
     6302 c                   return    p_CommDriver
                                              000000     247300
     6303 P                 E
                                             000000     247400
     6304
                                             000000     247500
     6305
                                             000000     247600
     6306
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     247700
     6307  *  http_url_post_raw2(): Post data to CGI script and get
   document                                        000000     247800
     6308  *
                                              000000     247900
     6309  *         peURL = url to post to
   ([15]http://www.blah.com/cgi-bin/etc)
         000000     248000
     6310  *      pePostFD = descriptor number to pass to pePostProc
                                              000000     248100
     6311  *    pePostProc = procedure to call to get POST data.
                                              000000     248200
     6312  *     peDataLen = total length of data that will be sent.
                                              000000     248300
     6313  *      peSaveFD = FD to pass back to peSaveProc
                                              000000     248400
     6314  *    peSaveProc = procedure to call each time data is
   received.                                          000000     248500
     6315  *    peTimeout  = (optional) give up if no data is received
   for                                          000000     248600
     6316  *            this many seconds.
                                              000000     248700
     6317  * peContentType = (optional) content type to supply (mainly
                                              000000     248800
     6318  *            useful when talking to CGI scripts)
                                             000000     248900
     6319  *
                                              000000     249000
     6320  *  Returns  -1 upon failure, 0 upon timeout, or an HTTP
   response code                                    000000     249100
     6321
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     249200
     6322 P http_url_post_raw2...
                                             000000     249300
     6323 P                 B                   export
                                              000000     249400
     6324 D http_url_post_raw2...
                                             000000     249500
     6325 D                 PI            10I 0
                                             000000     249600
     6326 D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   249700
     6327 D  pePostFD                     10I 0 value
                                             000000     249800
     6328 D  pePostProc                     *   procptr value
                                             000000     249900
     6329 D  peDataLen                    10I 0 value
                                             000000     250000
     6330 D  peSaveFD                     10I 0 value
                                             000000     250100
     6331 D  peSaveProc                     *   value procptr
                                             000000     250200
     6332 D  peTimeout                    10I 0 value options(*nopass)
                                              000000     250300
     6333 D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
     250400
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   118
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6334 D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
     250500
     6335 D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
     250600
     6336
                                             000000     250700
     6337 D wwComm          s               *
                                             000000     250800
     6338 D rc              s             10I 0
                                             000000     250900
     6339
                                             000000     251000
     6340  *********************************************************
                                              000000     251100
     6341  * Connect.
                                             000000     251200
     6342  *********************************************************
                                              000000     251300
     6343 c                   if        %parms < 7
                                    B01       000000     251400
     6344 c                   eval      wwComm = http_persist_open( peURL
   )                                01       000000     251500
     6345 c                   else
                                    X01       000000     251600
     6346 c                   eval      wwComm = http_persist_open( peURL
                                    01       000000     251700
     6347 c                                                       :
   peTimeout )                            01       000000     251800
     6348 c                   endif
                                   E01       000000     251900
     6349
                                             000000     252000
     6350 c                   if        wwComm = *NULL
                                    B01       000000     252100
     6351 c                   return    -1
                                     01       000000     252200
     6352 c                   endif
                                   E01       000000     252300
     6353
                                             000000     252400
     6354  *********************************************************
                                              000000     252500
     6355  * Post.
                                              000000     252600
     6356  *********************************************************
                                              000000     252700
     6357 c                   select
                                    B01       000000     252800
     6358 c                   when      %parms < 7
                                    X01       000000     252900
     6359 c                   eval      rc = http_persist_post( wwComm
                                     01       000000     253000
     6360 c                                                   : peURL
                                    01       000000     253100
     6361 c                                                   : pePostFD
                                     01       000000     253200
     6362 c                                                   :
   pePostProc                                 01       000000     253300
     6363 c                                                   : *NULL
                                    01       000000     253400
     6364 c                                                   : peDataLen
                                    01       000000     253500
     6365 c                                                   : peSaveFD
                                     01       000000     253600
     6366 c                                                   :
   peSaveProc )                               01       000000     253700
     6367
                                             000000     253800
     6368 c                   when      %parms < 8
                                    X01       000000     253900
     6369 c                   eval      rc = http_persist_post( wwComm
                                     01       000000     254000
     6370 c                                                   : peURL
                                    01       000000     254100
     6371 c                                                   : pePostFD
                                     01       000000     254200
     6372 c                                                   :
   pePostProc                                 01       000000     254300
     6373 c                                                   : *NULL
                                    01       000000     254400
     6374 c                                                   : peDataLen
                                    01       000000     254500
     6375 c                                                   : peSaveFD
                                     01       000000     254600
     6376 c                                                   :
   peSaveProc                                 01       000000     254700
     6377 c                                                   : peTimeout
    )                               01       000000     254800
     6378
                                             000000     254900
     6379 c                   when      %parms < 9
                                    X01       000000     255000
     6380 c                   eval      rc = http_persist_post( wwComm
                                     01       000000     255100
     6381 c                                                   : peURL
                                    01       000000     255200
     6382 c                                                   : pePostFD
                                     01       000000     255300
     6383 c                                                   :
   pePostProc                                 01       000000     255400
     6384 c                                                   : *NULL
                                    01       000000     255500
     6385 c                                                   : peDataLen
                                    01       000000     255600
     6386 c                                                   : peSaveFD
                                     01       000000     255700
     6387 c                                                   :
   peSaveProc                                 01       000000     255800
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   119
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6388 c                                                   : peTimeout
                                    01       000000     255900
     6389 c                                                   :
   peUserAgent )                              01       000000     256000
     6390
                                             000000     256100
     6391 c                   when      %parms < 10
                                   X01       000000     256200
     6392 c                   eval      rc = http_persist_post( wwComm
                                     01       000000     256300
     6393 c                                                   : peURL
                                    01       000000     256400
     6394 c                                                   : pePostFD
                                     01       000000     256500
     6395 c                                                   :
   pePostProc                                 01       000000     256600
     6396 c                                                   : *NULL
                                    01       000000     256700
     6397 c                                                   : peDataLen
                                    01       000000     256800
     6398 c                                                   : peSaveFD
                                     01       000000     256900
     6399 c                                                   :
   peSaveProc                                 01       000000     257000
     6400 c                                                   : peTimeout
                                    01       000000     257100
     6401 c                                                   :
   peUserAgent                                01       000000     257200
     6402 c                                                   :
   peContentType )                            01       000000     257300
     6403
                                             000000     257400
     6404 c                   other
                                   X01       000000     257500
     6405 c                   eval      rc = http_persist_post( wwComm
                                     01       000000     257600
     6406 c                                                   : peURL
                                    01       000000     257700
     6407 c                                                   : pePostFD
                                     01       000000     257800
     6408 c                                                   :
   pePostProc                                 01       000000     257900
     6409 c                                                   : *NULL
                                    01       000000     258000
     6410 c                                                   : peDataLen
                                    01       000000     258100
     6411 c                                                   : peSaveFD
                                     01       000000     258200
     6412 c                                                   :
   peSaveProc                                 01       000000     258300
     6413 c                                                   : peTimeout
                                    01       000000     258400
     6414 c                                                   :
   peUserAgent                                01       000000     258500
     6415 c                                                   :
   peContentType                              01       000000     258600
     6416 c                                                   :
   peSOAPAction )                             01       000000     258700
     6417 c                   endsl
                                   E01       000000     258800
     6418
                                             000000     258900
     6419  *********************************************************
                                              000000     259000
     6420  * Disconnect.
                                              000000     259100
     6421  *********************************************************
                                              000000     259200
     6422 c                   callp     http_persist_close( wwComm )
                                              000000     259300
     6423 c                   return    rc
                                              000000     259400
     6424 P                 E
                                             000000     259500
     6425
                                             000000     259600
     6426
                                             000000     259700
     6427
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     259800
     6428  *  http_url_post_stmf(): Post data to CGI script from stream
   file                                        000000     259900
     6429  *
                                              000000     260000
     6430  *         peURL = url to post to
   ([16]http://www.blah.com/cgi-bin/etc)
         000000     260100
     6431  *    pePostFile = Filename (in IFS) of file to send to http
   server                                       000000     260200
     6432  *    peRecvFile = Filename (in IFS) of stream file containing
   reply                                      000000     260300
     6433  *    peTimeout  = (optional) give up if no data is received
   for                                          000000     260400
     6434  *            this many seconds.
                                              000000     260500
     6435  * peContentType = (optional) content type to supply (mainly
                                              000000     260600
     6436  *            useful when talking to CGI scripts)
                                             000000     260700
     6437  *
                                              000000     260800
     6438  *  Returns  -1 upon failure, 0 upon timeout,
                                             000000     260900
     6439  *            1 for success, or an HTTP response code
                                             000000     261000
     6440
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     261100
     6441 P http_url_post_stmf...
                                             000000     261200
     6442 P                 B                   export
                                              000000     261300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   120
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6443 D http_url_post_stmf...
                                             000000     261400
     6444 D                 PI            10I 0
                                             000000     261500
     6445 D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   261600
     6446 D  pePostFile                32767A   varying const
   options(*varsize)                                     000000
   261700
     6447 D  peRecvFile                32767A   varying const
   options(*varsize)                                     000000
   261800
     6448 D  peTimeout                    10I 0 value options(*nopass)
                                              000000     261900
     6449 D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
     262000
     6450 D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
     262100
     6451 D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
     262200
     6452
                                             000000     262300
     6453 D wwPostFD        S             10I 0
                                             000000     262400
     6454 D wwRecvFD        S             10I 0
                                             000000     262500
     6455 D wwDataSize      s             10U 0
                                             000000     262600
     6456 D rc              S             10I 0
                                             000000     262700
     6457 D wwStat          s                   like(statds)
                                              000000     262800
     6458
                                             000000     262900
     6459 c                   callp     debug_msg('http_url_post_stmf():
   ' +                                        000000     263000
     6460 c                                      'entered')
                                             000000     263100
     6461
                                             000000     263200
     6462  *********************************************************
                                              000000     263300
     6463  * open file to be posted
                                             000000     263400
     6464  *********************************************************
                                              000000     263500
     6465 c                   callp     debug_msg('getting post file
   size...')                                      000000     263600
     6466 c                   if        stat(pePostFile: %addr(wwStat)) <
   0                               B01       000000     263700
     6467 c                   callp     SetError(HTTP_FDSTAT:'stat(): ' +
                                    01       000000     263800
     6468 c                                        %str(strerror(errno))
   )                                 01       000000     263900
     6469 c                   return    -1
                                     01       000000     264000
     6470 c                   endif
                                   E01       000000     264100
     6471
                                             000000     264200
     6472 c                   eval      p_statds = %addr(wwStat)
                                              000000     264300
     6473 c                   eval      wwDataSize = st_size
                                              000000     264400
     6474
                                             000000     264500
     6475 c                   callp     debug_msg('opening file to be
   sent...')                                     000000     264600
     6476 c                   eval      wwPostFD = open(pePostFile :
   O_RDONLY)                                      000000     264700
     6477 c                   if        wwPostFD < 0
                                    B01       000000     264800
     6478 c                   callp     SetError(HTTP_FDOPEN:'open(): ' +
                                    01       000000     264900
     6479 c                                        %str(strerror(errno))
   )                                 01       000000     265000
     6480 c                   return    -1
                                     01       000000     265100
     6481 c                   endif
                                   E01       000000     265200
     6482
                                             000000     265300
     6483  *********************************************************
                                              000000     265400
     6484  * open file for writing (O_WRONLY = write only)
                                              000000     265500
     6485  *    if it exists, truncate it (O_TRUNC = truncate)
                                              000000     265600
     6486  *    if it doesnt, create it (O_CREAT = create)
                                              000000     265700
     6487  *    and assign the ASCII codepage to it.
                                              000000     265800
     6488  *********************************************************
                                              000000     265900
     6489 c                   callp     debug_msg('opening file to be
   received')                                    000000     266000
     6490 c                   eval      wwRecvFD = open( peRecvFile
                                             000000     266100
     6491 c                                            : O_WRONLY
                                             000000     266200
     6492 c                                            + O_TRUNC
                                              000000     266300
     6493 c                                            + O_CREAT
                                              000000     266400
     6494 c                                            + CCSID_OR_CP
                                              000000     266500
     6495 c                                            : HTTP_IFSMODE
                                             000000     266600
     6496 c                                            : FILE_CCSID
                                             000000     266700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   121
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6497 c                                            )
                                              000000     266800
     6498 c                   if        wwRecvFD < 0
                                    B01       000000     266900
     6499 c                   callp     SetError(HTTP_FDOPEN:'open(): ' +
                                    01       000000     267000
     6500 c                               %str(strerror(errno)) )
                                    01       000000     267100
     6501 c                   callp     close(wwPostFD)
                                    01       000000     267200
     6502 c                   return    -1
                                     01       000000     267300
     6503 c                   endif
                                   E01       000000     267400
     6504
                                             000000     267500
     6505  *********************************************************
                                              000000     267600
     6506  *  Call the 'raw' post procedure, telling it to use
                                              000000     267700
     6507  *  the IFS API called 'write' to write data.
                                             000000     267800
     6508  *********************************************************
                                              000000     267900
     6509 c                   select
                                    B01       000000     268000
     6510 c                   when      %parms < 4
                                    X01       000000     268100
     6511 c                   eval      rc = http_url_post_raw2( peURL
                                     01       000000     268200
     6512 c                                                    : wwPostFD
                                    01       000000     268300
     6513 c                                                    :
   %paddr('read')                            01       000000     268400
     6514 c                                                    :
   wwDataSize                                01       000000     268500
     6515 c                                                    : wwRecvFD
                                    01       000000     268600
     6516 c                                                    :
   %paddr('write'))                          01       000000     268700
     6517 c                   when      %parms < 5
                                    X01       000000     268800
     6518 c                   eval      rc = http_url_post_raw2( peURL
                                     01       000000     268900
     6519 c                                                    : wwPostFD
                                    01       000000     269000
     6520 c                                                    :
   %paddr('read')                            01       000000     269100
     6521 c                                                    :
   wwDataSize                                01       000000     269200
     6522 c                                                    : wwRecvFD
                                    01       000000     269300
     6523 c                                                    :
   %paddr('write')                           01       000000     269400
     6524 c                                                    :
   peTimeout )                               01       000000     269500
     6525 c                   when      %parms < 6
                                    X01       000000     269600
     6526 c                   eval      rc = http_url_post_raw2( peURL
                                     01       000000     269700
     6527 c                                                    : wwPostFD
                                    01       000000     269800
     6528 c                                                    :
   %paddr('read')                            01       000000     269900
     6529 c                                                    :
   wwDataSize                                01       000000     270000
     6530 c                                                    : wwRecvFD
                                    01       000000     270100
     6531 c                                                    :
   %paddr('write')                           01       000000     270200
     6532 c                                                    :
   peTimeout                                 01       000000     270300
     6533 c                                                    :
   peUserAgent )                             01       000000     270400
     6534 c                   when      %parms < 7
                                    X01       000000     270500
     6535 c                   eval      rc = http_url_post_raw2( peURL
                                     01       000000     270600
     6536 c                                                    : wwPostFD
                                    01       000000     270700
     6537 c                                                    :
   %paddr('read')                            01       000000     270800
     6538 c                                                    :
   wwDataSize                                01       000000     270900
     6539 c                                                    : wwRecvFD
                                    01       000000     271000
     6540 c                                                    :
   %paddr('write')                           01       000000     271100
     6541 c                                                    :
   peTimeout                                 01       000000     271200
     6542 c                                                    :
   peUserAgent                               01       000000     271300
     6543 c                                                    :
   peContentType )                           01       000000     271400
     6544 c                   other
                                   X01       000000     271500
     6545 c                   eval      rc = http_url_post_raw2( peURL
                                     01       000000     271600
     6546 c                                                    : wwPostFD
                                    01       000000     271700
     6547 c                                                    :
   %paddr('read')                            01       000000     271800
     6548 c                                                    :
   wwDataSize                                01       000000     271900
     6549 c                                                    : wwRecvFD
                                    01       000000     272000
     6550 c                                                    :
   %paddr('write')                           01       000000     272100
     6551 c                                                    :
   peTimeout                                 01       000000     272200
     6552 c                                                    :
   peUserAgent                               01       000000     272300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   122
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6553 c                                                    :
   peContentType                             01       000000     272400
     6554 c                                                    :
   peSOAPAction )                            01       000000     272500
     6555 c                   endsl
                                   E01       000000     272600
     6556
                                             000000     272700
     6557 c                   callp     close(wwPostFD)
                                             000000     272800
     6558 c                   callp     close(wwRecvFD)
                                             000000     272900
     6559 c                   return    rc
                                              000000     273000
     6560 P                 E
                                             000000     273100
     6561
                                             000000     273200
     6562
                                             000000     273300
     6563
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     273400
     6564  *  http_persist_open(): Open a persistent HTTP session
                                             000000     273500
     6565  *
                                              000000     273600
     6566  *       peURL = url to connect to
                                              000000     273700
     6567  *  peTimeout  = (optional) give up if no data is received for
                                              000000     273800
     6568  *          this many seconds.
                                              000000     273900
     6569  *
                                              000000     274000
     6570  *  Returns *NULL upon failure, or
                                              000000     274100
     6571  *          pointer to HTTP communication session
                                             000000     274200
     6572
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     274300
     6573 P http_persist_open...
                                              000000     274400
     6574 P                 B                   export
                                              000000     274500
     6575 D http_persist_open...
                                              000000     274600
     6576 D                 PI              *
                                             000000     274700
     6577 D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   274800
     6578 D  peTimeout                    10I 0 value options(*nopass)
                                              000000     274900
     6579
                                             000000     275000
     6580 D wwTimeout       S             10I 0
                                             000000     275100
     6581 D wwServ          S             32A
                                             000000     275200
     6582 D wwUser          S             32A
                                             000000     275300
     6583 D wwPass          S             32A
                                             000000     275400
     6584 D wwHost          S            256A
                                             000000     275500
     6585 D wwPort          S             10I 0
                                             000000     275600
     6586 D wwOrigHost      S            256A
                                             070611     275700
     6587 D wwOrigPort      S             10I 0
                                             070611     275800
     6588 D wwPath          S          32767A   varying
                                             000000     275900
     6589 D wwComm          s               *
                                             000000     276000
     6590 D p_addr          s               *
                                             000000     276100
     6591
                                             000000     276200
     6592 c                   callp     debug_msg('http_persist_open():'
                                              000000     276300
     6593 c                                     + ' entered')
                                             000000     276400
     6594
                                             000000     276500
     6595  *********************************************************
                                              000000     276600
     6596  * Set up optional parameters (timeout)
                                             000000     276700
     6597  *********************************************************
                                              000000     276800
     6598 c                   if        %parms>=2 and peTimeout>=0
                                    B01       000000     276900
     6599 c                   eval      wwTimeout = peTimeout
                                    01       000000     277000
     6600 c                   else
                                    X01       000000     277100
     6601 c                   eval      wwTimeout = HTTP_TIMEOUT
                                     01       000000     277200
     6602 c                   endif
                                   E01       000000     277300
     6603
                                             000000     277400
     6604  *********************************************************
                                              000000     277500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   123
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6605  *  Parse URL into it's components
                                              000000     277600
     6606  *********************************************************
                                              000000     277700
     6607 c                   if        http_long_ParseURL(peURL: wwServ:
   wwUser:                         B01       000000     277800
     6608 c                                wwPass: wwHost: wwPort:
   wwPath) < 0                            B01       000000     277900
     6609 c                   return    *NULL
                                    01       000000     278000
     6610 c                   endif
                                   E01       000000     278100
     6611
                                             000000     278200
     6612  *********************************************************
                                              000000     278300
     6613  *  Proxy address provided?
                                             000000     278400
     6614  *********************************************************
                                              000000     278500
     6615 c                   eval      wwOrigHost = wwHost
                                             070611     278600
     6616 c                   eval      wwOrigPort = wwPort
                                             070611     278700
     6617
                                             070611     278800
     6618 c                   if        dsProxyHost <> *blanks
                                    B01       000000     278900
     6619 c                   eval      wwHost = dsProxyHost
                                     01       070611     279000
     6620 c                   endif
                                   E01       000000     279100
     6621
                                             000000     279200
     6622 c                   if        dsProxyPort <> *zeros
                                   B01       000000     279300
     6623 c                   eval      wwPort = dsProxyPort
                                     01       070611     279400
     6624 c                   endif
                                   E01       000000     279500
     6625
                                             070611     279600
     6626 c                   if        dsProxyHost <> *blanks
                                    B01       070611     279700
     6627 c                               and wwServ='https'
                                    B01       070611     279800
     6628 c                   eval      dsProxyTun = *ON
                                     01       070611     279900
     6629 c                   else
                                    X01       070611     280000
     6630 c                   eval      dsProxyTun = *OFF
                                    01       070611     280100
     6631 c                   endif
                                   E01       070611     280200
     6632
                                             000000     280300
     6633  *********************************************************
                                              000000     280400
     6634  *  Select comm driver & build a socket address structure
                                             000000     280500
     6635  *********************************************************
                                              000000     280600
     6636 c                   eval      wwComm =
   http_select_commdriver(wwServ)
   000000     280700
     6637 c                   if        wwComm = *NULL
                                    B01       000000     280800
     6638 c                   return    *NULL
                                    01       000000     280900
     6639 c                   endif
                                   E01       000000     281000
     6640
                                             000000     281100
     6641 c                   eval      p_addr = comm_resolve( wwComm
                                             000000     281200
     6642 c                                                  :
   %trimr(wwHost)                                       000000     281300
     6643 c                                                  :
   %trimr(wwServ)                                       000000     281400
     6644 c                                                  : wwPort
                                             000000     281500
     6645 c                                                  : *OFF    )
                                              000000     281600
     6646
                                             000000     281700
     6647 c                   if        p_addr = *NULL
                                    B01       000000     281800
     6648 c                   return    *NULL
                                    01       000000     281900
     6649 c                   endif
                                   E01       000000     282000
     6650
                                             000000     282100
     6651  *********************************************************
                                              000000     282200
     6652  * Connect to server
                                              000000     282300
     6653  *********************************************************
                                              000000     282400
     6654 c                   if        comm_Connect( wwComm
                                    B01       000000     282500
     6655 c                                         : p_addr
                                    B01       000000     282600
     6656 c                                         : wwTimeout
                                   B01       000000     282700
     6657 c                                         ) = *OFF
                                    B01       000000     282800
     6658 c                   return    *NULL
                                    01       000000     282900
     6659 c                   endif
                                   E01       000000     283000
     6660
                                             070611     283100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   124
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6661  *********************************************************
                                              070611     283200
     6662  * Establish proxy tunnelling if necessary
                                              070611     283300
     6663  *********************************************************
                                              070611     283400
     6664 c                   if        dsProxyTun = *ON
                                    B01       070611     283500
     6665 c                   if        proxy_tunnel( wwComm
                                    B02       070611     283600
     6666 c                                         : wwServ
                                    B02       070611     283700
     6667 C                                         : wwOrigHost
                                    B02       070611     283800
     6668 c                                         : wwOrigPort
                                    B02       070611     283900
     6669 c                                         : wwTimeout ) <> 0
                                    B02       070611     284000
     6670 c                   callp     http_persist_close( wwComm )
                                     02       070611     284100
     6671 c                   return    *NULL
                                    02       070611     284200
     6672 c                   endif
                                   E02       070611     284300
     6673 c                   endif
                                   E01       070611     284400
     6674
                                             070611     284500
     6675  *********************************************************
                                              070611     284600
     6676  * Upgrade connection security (if driver supports it)
                                              070611     284700
     6677  * (if wwComm is the SSL driver, this starts SSL encryption)
                                              070611     284800
     6678  *********************************************************
                                              070611     284900
     6679 c                   if        comm_Upgrade( wwComm
                                    B01       070611     285000
     6680 c                                         : wwTimeout
                                   B01       070611     285100
     6681 c                                         ) = *OFF
                                    B01       070611     285200
     6682 c                   return    *NULL
                                    01       070611     285300
     6683 c                   endif
                                   E01       070611     285400
     6684
                                             000000     285500
     6685 c                   return    wwComm
                                              000000     285600
     6686 P                 E
                                             000000     285700
     6687
                                             000000     285800
     6688
                                             000000     285900
     6689
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     286000
     6690  *  http_persist_get(): Get a file using a persistent HTTP
   session                                        000000     286100
     6691  *
                                              000000     286200
     6692  *         peComm = (input) pointer to persistent HTTP comm
   session                                       000000     286300
     6693  *          peURL = (input) URL to get from persistent HTTP
                                             000000     286400
     6694  *           peFD = (input) FD to pass back to peProc
                                             000000     286500
     6695  *         peProc = (input) procedure to call each time data is
                                             000000     286600
     6696  *                          received.
                                             000000     286700
     6697  *      peTimeout = (input/optional) time-out when no data is
   received                                    000000     286800
     6698  *                          for this many seconds.
                                              000000     286900
     6699  *      peModTime = (input/optional) only get file if it was
   changed                                      000000     287000
     6700  *                          since this timestamp.
                                             000000     287100
     6701  *  peContentType = (input/optional) content type to supply
   (mainly                                       000000     287200
     6702  *                          useful when talking to CGI scripts)
                                             000000     287300
     6703  *   peSOAPAction = (input/optional) string to send in the
   SOAPAction:                                    000000     287400
     6704  *                          HTTP header when making a SOAP
   request.                                       000000     287500
     6705  *
                                              000000     287600
     6706  *  Returns  1 if successful,
                                             000000     287700
     6707  *           0 if timed out
                                             000000     287800
     6708  *          -1 if an internal error occurs
                                              000000     287900
     6709  *          or an HTTP response code if an error comes from the
   server                                    000000     288000
     6710
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     288100
     6711 P http_persist_get...
                                             000000     288200
     6712 P                 B                   export
                                              000000     288300
     6713 D http_persist_get...
                                             000000     288400
     6714 D                 PI            10I 0
                                             000000     288500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   125
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6715 D  peComm                         *   value
                                             000000     288600
     6716 D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   288700
     6717 D  peFD                         10I 0 value
                                             000000     288800
     6718 D  peProc                         *   value procptr
                                             000000     288900
     6719 D  peTimeout                    10I 0 value options(*nopass)
                                              000000     289000
     6720 D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
     289100
     6721 D  peModTime                      Z   const
   options(*nopass:*omit)                                        000000
     289200
     6722 D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
     289300
     6723 D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
     289400
     6724
                                             000000     289500
     6725 D wwUA            S             64A
                                             000000     289600
     6726 D wwMT            S               Z
                                             000000     289700
     6727 D wwCT            S             64A
                                             000000     289800
     6728 D wwSA            S             64A
                                             000000     289900
     6729 D wwTimeout       S             10I 0
                                             000000     290000
     6730 D p_UserAgent     S               *
                                             000000     290100
     6731 D wwUserAgent     S             64A   based(p_UserAgent)
                                              000000     290200
     6732 D p_ModTime       S               *
                                             000000     290300
     6733 D wwModTime       S               Z   based(p_ModTime)
                                              000000     290400
     6734 D p_ContentType   S               *
                                             000000     290500
     6735 D wwContentType   S             64A   based(p_ContentType)
                                              000000     290600
     6736 D p_SOAPAction    S               *
                                             000000     290700
     6737 D wwSOAPAction    S             64A   based(p_SOAPAction)
                                             000000     290800
     6738 D wwServ          S             32A
                                             000000     290900
     6739 D wwUser          S             32A
                                             000000     291000
     6740 D wwPass          S             32A
                                             000000     291100
     6741 D wwHost          S            256A
                                             000000     291200
     6742 D wwPort          S             10I 0
                                             000000     291300
     6743 D wwPath          S          32767A   varying
                                             000000     291400
     6744 D rc              S             10I 0
                                             000000     291500
     6745 D wwSecure        s              1N   inz(*OFF)
                                             000000     291600
     6746
                                             000000     291700
     6747 c                   callp     debug_msg('http_persist_get():'
                                             000000     291800
     6748 c                                     + ' entered')
                                             000000     291900
     6749
                                             000000     292000
     6750  *********************************************************
                                              000000     292100
     6751  * Set up optional parameters
                                             000000     292200
     6752  *********************************************************
                                              000000     292300
     6753  * If no timeout given, default to 5 minutes
                                              000000     292400
     6754 c                   if        %parms>=5 and peTimeout>=0
                                    B01       000000     292500
     6755 c                   eval      wwTimeout = peTimeout
                                    01       000000     292600
     6756 c                   else
                                    X01       000000     292700
     6757 c                   eval      wwTimeout = HTTP_TIMEOUT
                                     01       000000     292800
     6758 c                   endif
                                   E01       000000     292900
     6759
                                             000000     293000
     6760  * If no user-agent given, pass '*OMIT' to next proc
                                              000000     293100
     6761 c                   if        %parms >= 6
                                   B01       000000     293200
     6762 c                   eval      p_UserAgent = %addr(wwUA)
                                    01       000000     293300
     6763 c                   eval      wwUserAgent = peUserAgent
                                    01       000000     293400
     6764 c                   else
                                    X01       000000     293500
     6765 c                   eval      p_UserAgent = *NULL
                                    01       000000     293600
     6766 c                   endif
                                   E01       000000     293700
     6767
                                             000000     293800
     6768  * If no mod time given, pass '*OMIT' to next proc
                                              000000     293900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   126
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6769 c                   if        %parms >= 7
                                   B01       000000     294000
     6770 c                   eval      p_ModTime = %addr(wwMT)
                                    01       000000     294100
     6771 c                   eval      wwModTime = peModTime
                                    01       000000     294200
     6772 c                   else
                                    X01       000000     294300
     6773 c                   eval      p_ModTime = *NULL
                                    01       000000     294400
     6774 c                   endif
                                   E01       000000     294500
     6775
                                             000000     294600
     6776  * If no content-type given, pass '*OMIT' to next proc
                                              000000     294700
     6777 c                   if        %parms >= 8
                                   B01       000000     294800
     6778 c                   eval      p_ContentType = %addr(wwCT)
                                    01       000000     294900
     6779 c                   eval      wwContentType = peContentType
                                    01       000000     295000
     6780 c                   else
                                    X01       000000     295100
     6781 c                   eval      p_ContentType = *NULL
                                    01       000000     295200
     6782 c                   endif
                                   E01       000000     295300
     6783
                                             000000     295400
     6784  * If no SoapAction given, pass '*OMIT' to next proc
                                              000000     295500
     6785 c                   if        %parms >= 9
                                   B01       000000     295600
     6786 c                   eval      p_SOAPAction = %addr(wwSA)
                                     01       000000     295700
     6787 c                   eval      wwSOAPAction = peSOAPAction
                                    01       000000     295800
     6788 c                   else
                                    X01       000000     295900
     6789 c                   eval      p_SOAPAction = *NULL
                                     01       000000     296000
     6790 c                   endif
                                   E01       000000     296100
     6791
                                             000000     296200
     6792  *********************************************************
                                              000000     296300
     6793  * Parse URL.  We have to do this again, despite having
                                             000000     296400
     6794  *   done it in HTTP_persist_open() because it's
                                              000000     296500
     6795  *   possible to change some parts of it from call to
                                             000000     296600
     6796  *   call.
                                              000000     296700
     6797  *********************************************************
                                              000000     296800
     6798 c                   if        http_long_ParseURL(peURL: wwServ:
   wwUser:                         B01       000000     296900
     6799 c                                wwPass: wwHost: wwPort:
   wwPath) < 0                            B01       000000     297000
     6800 c                   return    -1
                                     01       000000     297100
     6801 c                   endif
                                   E01       000000     297200
     6802
                                             000000     297300
     6803 c                   if        wwServ='https'
                                    B01       000000     297400
     6804 c                   eval      wwSecure = *ON
                                     01       000000     297500
     6805 c                   endif
                                   E01       000000     297600
     6806
                                             000000     297700
     6807 c                   callp     setUrlAuth(wwUser: wwPass)
                                              000000     297800
     6808
                                             000000     297900
     6809  *********************************************************
                                              000000     298000
     6810  *  Perform the GET operation
                                             000000     298100
     6811  *********************************************************
                                              000000     298200
     6812 c                   eval      rc = do_get( peProc
                                             000000     298300
     6813 c                                        : peComm
                                             000000     298400
     6814 c                                        : peFD
                                             000000     298500
     6815 c                                        : wwTimeout
                                              000000     298600
     6816 c                                        : wwPath
                                             000000     298700
     6817 c                                        : wwHost
                                             000000     298800
     6818 c                                        : wwModTime
                                              000000     298900
     6819 c                                        : wwUserAgent
                                              000000     299000
     6820 c                                        : wwContentType
                                              000000     299100
     6821 c                                        : wwSoapAction
                                             000000     299200
     6822 c                                        : wwPort
                                             000000     299300
     6823 c                                        : wwSecure
                                             000000     299400
     6824 c                                        : wwServ
                                             000000     299500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   127
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6825 c                                        )
                                              000000     299600
     6826
                                             000000     299700
     6827 c                   if        wkSaveAuth <> *blanks
                                   B01       000000     299800
     6828 c                   eval      dsAuth = wkSaveAuth
                                    01       000000     299900
     6829 c                   eval      wkSaveAuth = *blanks
                                     01       000000     300000
     6830 c                   endif
                                   E01       000000     300100
     6831
                                             000000     300200
     6832 c                   return    rc
                                              000000     300300
     6833 P                 E
                                             000000     300400
     6834
                                             000000     300500
     6835
                                             000000     300600
     6836
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     300700
     6837  *  http_persist_post(): Post data to CGI script and get
   document                                         000000     300800
     6838  *                       using a persistent connection
                                              000000     300900
     6839  *
                                              000000     301000
     6840  *         peComm = (input) pointer to persistent HTTP comm
   session                                       000000     301100
     6841  *          peURL = (input) URL to post to with persistent HTTP
                                             000000     301200
     6842  * --------
                                             000000     301300
     6843  *       pePostFD = (input) Opaque integer to pass to
   pePostProc                                          000000     301400
     6844  *     pePostProc = (input) Pointer to call-back procedure for
                                              000000     301500
     6845  *                          posting data to server.  If you
   pass                                          000000     301600
     6846  *                          *NULL for this, you should use
   pePostData                                     000000     301700
     6847  *                          instead.
                                              000000     301800
     6848  * -- or --
                                             000000     301900
     6849  *     pePostData = (input) Pointer to data to post.  If you
   pass                                         000000     302000
     6850  *                          *NULL for this, you should use
   pePostProc                                     000000     302100
     6851  *                          instead.
                                              000000     302200
     6852  * --------
                                             000000     302300
     6853  *  pePostDataLen = (input) Total length, in bytes, of post
   data.                                         000000     302400
     6854  *       peSaveFD = (input) Opaque integer passed to peSaveProc
                                             000000     302500
     6855  *     peSaveProc = (input) Pointer to call-back procedure that
   is                                        000000     302600
     6856  *                          called when data is received from
   HTTP                                        000000     302700
     6857  *                          server.
                                             000000     302800
     6858  *      peTimeout = (input/optional) time-out when no data is
   received                                    000000     302900
     6859  *                          for this many seconds.
                                              000000     303000
     6860  *  peContentType = (input/optional) content type to supply
   (mainly                                       000000     303100
     6861  *                          useful when talking to CGI scripts)
                                             000000     303200
     6862  *   peSOAPAction = (input/optional) string to send in the
   SOAPAction:                                    000000     303300
     6863  *                          HTTP header when making a SOAP
   request.                                       000000     303400
     6864  *
                                              000000     303500
     6865  *  Returns  1 if successful,
                                             000000     303600
     6866  *           0 if timed out
                                             000000     303700
     6867  *          -1 if an internal error occurs
                                              000000     303800
     6868  *          or an HTTP response code if an error comes from the
   server                                    000000     303900
     6869
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     304000
     6870 P http_persist_post...
                                              000000     304100
     6871 P                 B                   export
                                              000000     304200
     6872 D http_persist_post...
                                              000000     304300
     6873 D                 PI            10I 0
                                             000000     304400
     6874 D  peComm                         *   value
                                             000000     304500
     6875 D  peURL                     32767A   varying const
   options(*varsize)                                     000000
   304600
     6876 D  pePostFD                     10I 0 value
                                             000000     304700
     6877 D  pePostProc                     *   value procptr
                                             000000     304800
     6878 D  pePostData                     *   value
                                             000000     304900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   128
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6879 D  pePostDataLen                10I 0 value
                                             000000     305000
     6880 D  peSaveFD                     10I 0 value
                                             000000     305100
     6881 D  peSaveProc                     *   value procptr
                                             000000     305200
     6882 D  peTimeout                    10I 0 value options(*nopass)
                                              000000     305300
     6883 D  peUserAgent                  64A   const
   options(*nopass:*omit)                                        000000
     305400
     6884 D  peContentType                64A   const
   options(*nopass:*omit)                                        000000
     305500
     6885 D  peSOAPAction                 64A   const
   options(*nopass:*omit)                                        000000
     305600
     6886
                                             000000     305700
     6887 D wwUA            S             64A
                                             000000     305800
     6888 D wwCT            S             64A
                                             000000     305900
     6889 D wwSA            S             64A
                                             000000     306000
     6890 D wwTimeout       S             10I 0
                                             000000     306100
     6891 D p_UserAgent     S               *
                                             000000     306200
     6892 D wwUserAgent     S             64A   based(p_UserAgent)
                                              000000     306300
     6893 D p_ContentType   S               *
                                             000000     306400
     6894 D wwContentType   S             64A   based(p_ContentType)
                                              000000     306500
     6895 D p_SOAPAction    S               *
                                             000000     306600
     6896 D wwSOAPAction    S             64A   based(p_SOAPAction)
                                             000000     306700
     6897 D wwServ          S             32A
                                             000000     306800
     6898 D wwUser          S             32A
                                             000000     306900
     6899 D wwPass          S             32A
                                             000000     307000
     6900 D wwHost          S            256A
                                             000000     307100
     6901 D wwPort          S             10I 0
                                             000000     307200
     6902 D wwPath          S          32767A   varying
                                             000000     307300
     6903 D rc              S             10I 0
                                             000000     307400
     6904 D wwSendProc      s               *   procptr
                                             000000     307500
     6905 D wwSecure        s              1N   inz(*OFF)
                                             000000     307600
     6906 D wwPostData      s                   like(pePostData)
   inz(*null)                                         070409     307700
     6907 D wwPostLen       s                   like(pePostDataLen)
                                             070409     307800
     6908
                                             000000     307900
     6909 c                   callp     debug_msg('http_persist_post():
   entered')                                   000000     308000
     6910
                                             000000     308100
     6911  *********************************************************
                                              000000     308200
     6912  *  Handle the optional parameters
                                              000000     308300
     6913  *********************************************************
                                              000000     308400
     6914  * If no timeout, default to 5 mins
                                             000000     308500
     6915 c                   if        %parms>=9 and peTimeout>=0
                                    B01       000000     308600
     6916 c                   eval      wwTimeout = peTimeout
                                    01       000000     308700
     6917 c                   else
                                    X01       000000     308800
     6918 c                   eval      wwTimeout = HTTP_TIMEOUT
                                     01       000000     308900
     6919 c                   endif
                                   E01       000000     309000
     6920
                                             000000     309100
     6921  * If no user-agent, pass '*OMIT' to next proc
                                              000000     309200
     6922 c                   if        %parms>=10
                                    B01       000000     309300
     6923 c                   eval      p_UserAgent = %addr(wwUA)
                                    01       000000     309400
     6924 c                   eval      wwUserAgent = peUserAgent
                                    01       000000     309500
     6925 c                   else
                                    X01       000000     309600
     6926 c                   eval      p_UserAgent = *NULL
                                    01       000000     309700
     6927 c                   endif
                                   E01       000000     309800
     6928
                                             000000     309900
     6929  * If no content-type, pass '*OMIT' to next proc
                                              000000     310000
     6930 c                   if        %parms>=11
                                    B01       000000     310100
     6931 c                   eval      p_ContentType = %addr(wwCT)
                                    01       000000     310200
     6932 c                   eval      wwContentType = peContentType
                                    01       000000     310300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   129
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6933 c                   else
                                    X01       000000     310400
     6934 c                   eval      p_ContentType = *NULL
                                    01       000000     310500
     6935 c                   endif
                                   E01       000000     310600
     6936
                                             000000     310700
     6937  * If no SOAPaction, pass '*OMIT' to next proc
                                              000000     310800
     6938 c                   if        %parms>=12
                                    B01       000000     310900
     6939 c                   eval      p_SOAPAction = %addr(wwSA)
                                     01       000000     311000
     6940 c                   eval      wwSOAPAction = peSOAPAction
                                    01       000000     311100
     6941 c                   else
                                    X01       000000     311200
     6942 c                   eval      p_SOAPAction = *NULL
                                     01       000000     311300
     6943 c                   endif
                                   E01       000000     311400
     6944
                                             000000     311500
     6945  *********************************************************
                                              000000     311600
     6946  *  Parse URL into it's components, and then look up
                                              000000     311700
     6947  *  host & build a socket address structure:
                                              000000     311800
     6948  *********************************************************
                                              000000     311900
     6949 c                   if        http_long_ParseURL(peURL: wwServ:
   wwUser:                         B01       000000     312000
     6950 c                                wwPass: wwHost: wwPort:
   wwPath) < 0                            B01       000000     312100
     6951 c                   return    -1
                                     01       000000     312200
     6952 c                   endif
                                   E01       000000     312300
     6953
                                             000000     312400
     6954 c                   if        wwServ = 'https'
                                    B01       000000     312500
     6955 c                   eval      wwSecure = *ON
                                     01       000000     312600
     6956 c                   endif
                                   E01       000000     312700
     6957
                                             000000     312800
     6958 c                   callp     setUrlAuth(wwUser: wwPass)
                                              000000     312900
     6959
                                             070409     313000
     6960  *********************************************************
                                              070409     313100
     6961  * Translate POST data to ASCII (if necessary)
                                              070409     313200
     6962  *********************************************************
                                              070409     313300
     6963 c                   eval      wwPostLen = pePostDataLen
                                             070604     313400
     6964 c                   if        pePostDataLen>0 and
   pePostProc=*NULL                              B01       070409
   313500
     6965 c                   eval      wwPostLen = http_xlatedyn(
   pePostDataLen                           01       070409     313600
     6966 c                                                      :
   pePostData                              01       070409     313700
     6967 c                                                      :
   TO_ASCII                                01       070409     313800
     6968 c                                                      :
   wwPostData )                            01       070409     313900
     6969 c                   if        wwPostLen = -1
                                    B02       070409     314000
     6970 c                   return    -1
                                     02       070409     314100
     6971 c                   endif
                                   E02       070409     314200
     6972 c                   endif
                                   E01       070409     314300
     6973
                                             000000     314400
     6974  *********************************************************
                                              000000     314500
     6975  * Perform the POST operation
                                             000000     314600
     6976  *********************************************************
                                              000000     314700
     6977 c                   if        pePostProc = *NULL
                                    B01       000000     314800
     6978 c                   eval      wwSendProc = %paddr('SENDDOC')
                                     01       000000     314900
     6979 c                   else
                                    X01       000000     315000
     6980 c                   eval      wwSendProc = %paddr('SENDRAW')
                                     01       000000     315100
     6981 c                   eval      wwPostData = *NULL
                                     01       070409     315200
     6982 c                   endif
                                   E01       000000     315300
     6983
                                             000000     315400
     6984 c                   eval      rc = do_post( peSaveProc
                                              000000     315500
     6985 c                                         : wwSendProc
                                              000000     315600
     6986 c                                         : wwPostData
                                              070409     315700
     6987 c                                         : wwPostLen
                                             070409     315800
     6988 c                                         : peComm
                                              000000     315900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   130
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     6989 c                                         : peSaveFD
                                              000000     316000
     6990 c                                         : wwTimeout
                                             000000     316100
     6991 c                                         : wwPath
                                              000000     316200
     6992 c                                         : wwHost
                                              000000     316300
     6993 c                                         : wwUserAgent
                                             000000     316400
     6994 c                                         : wwContentType
                                             000000     316500
     6995 c                                         : wwSOAPAction
                                              000000     316600
     6996 c                                         : pePostProc
                                              000000     316700
     6997 c                                         : pePostFD
                                              000000     316800
     6998 c                                         : wwPort
                                              000000     316900
     6999 c                                         : wwSecure
                                              000000     317000
     7000 c                                         : wwServ
                                              000000     317100
     7001 c                                         )
                                             000000     317200
     7002
                                             000000     317300
     7003 c                   if        wkSaveAuth <> *blanks
                                   B01       000000     317400
     7004 c                   eval      dsAuth = wkSaveAuth
                                    01       000000     317500
     7005 c                   eval      wkSaveAuth = *blanks
                                     01       000000     317600
     7006 c                   endif
                                   E01       000000     317700
     7007
                                             070409     317800
     7008 c                   if        wwPostData <> *Null
                                   B01       070409     317900
     7009 c                   callp     xdealloc(wwPostData)
                                     01       070409     318000
     7010 c                   endif
                                   E01       070409     318100
     7011
                                             000000     318200
     7012 c                   return    rc
                                              000000     318300
     7013 P                 E
                                             000000     318400
     7014
                                             000000     318500
     7015
                                             000000     318600
     7016
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     318700
     7017  *  http_persist_close(): End a persistent HTTP session
                                             000000     318800
     7018  *
                                              000000     318900
     7019  *     peComm = (input) pointer to persistent HTTP comm session
                                             000000     319000
     7020  *
                                              000000     319100
     7021  *  returns 0 if successful, -1 otherwise
                                             000000     319200
     7022
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     319300
     7023 P http_persist_close...
                                             000000     319400
     7024 P                 B                   export
                                              000000     319500
     7025 D http_persist_close...
                                             000000     319600
     7026 D                 PI            10I 0
                                             000000     319700
     7027 D  peComm                         *   value
                                             000000     319800
     7028 c                   return    http_close( 0 : peComm)
                                             000000     319900
     7029 P                 E
                                             000000     320000
     7030
                                             000000     320100
     7031
                                             000000     320200
     7032
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     320300
     7033  * parse important fields from the response chain
                                             000000     320400
     7034
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     320500
     7035 P parse_resp_chain...
                                             000000     320600
     7036 P                 B
                                             000000     320700
     7037 D parse_resp_chain...
                                             000000     320800
     7038 D                 PI            10I 0
                                             000000     320900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   131
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     7039 D  peRespChain               32767A   varying const
                                             000000     321000
     7040 D  peRC                         10I 0
                                             000000     321100
     7041 D  peTE                         32A
                                             000000     321200
     7042 D  peCLen                       10u 0
                                             000000     321300
     7043 D  peUseCL                       1N
                                             000000     321400
     7044 D  peAuthErr                     1N
                                             000000     321500
     7045 D  peProxyAuthErr...
                                              000000     321600
     7046 D                                1N
                                             000000     321700
     7047 D  peHost                      256A   varying const
                                             000000     321800
     7048 D  pePath                      256A   varying const
                                             000000     321900
     7049
                                             000000     322000
     7050 D wwChain         S          32767A   varying
                                             000000     322100
     7051 D wwPos           S             10I 0
                                             000000     322200
     7052 D wwPos2          S             10I 0
                                             000000     322300
     7053 D wwCL            S             32A
                                             000000     322400
     7054 D LF              S              1A   inz(x'25') static
                                             000000     322500
     7055 D CRLF            S              2A   inz(x'0d25') static
                                             000000     322600
     7056
                                             000000     322700
     7057 c                   select
                                    B01       000000     322800
     7058 c                   when      peRC = 401
                                    X01       000000     322900
     7059 c                   eval      peAuthErr = *on
                                    01       000000     323000
     7060
                                             000000     323100
     7061 c                   when      peRC = 407
                                    X01       000000     323200
     7062 c                   eval      peProxyAuthErr = *on
                                     01       000000     323300
     7063
                                             000000     323400
     7064 c                   when      peRC<=100 or peRC=204 or peRC=304
                                   X01       000000     323500
     7065 c                   return    peRC
                                     01       000000     323600
     7066 c                   endsl
                                   E01       000000     323700
     7067
                                             000000     323800
     7068  *********************************************************
                                              000000     323900
     7069  * Make an uppercase copy of the response chain so
                                              000000     324000
     7070  * we can do case-insensitive searching on it.
                                              000000     324100
     7071  *********************************************************
                                              000000     324200
     7072 c                   eval      wwChain = peRespChain
                                             000000     324300
     7073 c     upper:lower   xlate     wwChain       wwChain
                                             000000     324400
     7074
                                             000000     324500
     7075  *********************************************************
                                              000000     324600
     7076  * parse out transfer-encoding:
                                             000000     324700
     7077  *********************************************************
                                              000000     324800
     7078 c                   eval      peTE = 'identity'
                                             000000     324900
     7079 c                   eval      wwPos =
   %scan(LF+'transfer-encoding:':
   000000     325000
     7080 c                                  wwChain)
                                             000000     325100
     7081 c                   if        wwPos > 0
                                   B01       000000     325200
     7082 c                   eval      wwPos = wwPos + 19
                                     01       000000     325300
     7083 c                   eval      wwPos2 =
   %scan(CRLF:wwChain:wwPos)                                 01
   000000     325400
     7084 c                   eval      wwPos2 = wwPos2 - wwPos
                                    01       000000     325500
     7085 c                   if        wwPos2 > 0
                                    B02       000000     325600
     7086 c                   eval      peTE=
   %trim(%subst(wwChain:wwPos:wwPos2))                          02
   000000     325700
     7087 c                   endif
                                   E02       000000     325800
     7088 c                   endif
                                   E01       000000     325900
     7089
                                             000000     326000
     7090 c                   if        %scan('chunked': peTE)=0  and
                                   B01       000000     326100
     7091 c                               %scan('identity': peTE)=0
                                   B01       000000     326200
     7092 c                   callp     SetError(HTTP_XFRENC: 'The "' +
                                    01       000000     326300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   132
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     7093 c                              %trim(peTE) + '" transfer
   encoding is'+                           01       000000     326400
     7094 c                              ' not supported.')
                                    01       000000     326500
     7095 c                   return    -1
                                     01       000000     326600
     7096 c                   endif
                                   E01       000000     326700
     7097
                                             000000     326800
     7098  *********************************************************
                                              000000     326900
     7099  *  parse out content-length if using "identity,"
                                             000000     327000
     7100  *   (this is irrelevant for "chunked")
                                             000000     327100
     7101  *********************************************************
                                              000000     327200
     7102 c                   eval      wwCL = '0'
                                              000000     327300
     7103 c                   eval      peUseCL = *OFF
                                              000000     327400
     7104 c                   if        %scan('identity': peTE) > 0
                                   B01       000000     327500
     7105 c                   eval      wwPos =
   %scan(LF+'content-length:':                                01
   000000     327600
     7106 c                                           wwChain)
                                     01       000000     327700
     7107 c                   if        wwPos > 0
                                   B02       000000     327800
     7108 c                   eval      wwPos = wwPos + 16
                                     02       000000     327900
     7109 c                   eval      wwPos2 =
   %scan(CRLF:wwChain:wwPos)                                 02
   000000     328000
     7110 c                   eval      wwPos2 = wwPos2 - wwPos
                                    02       000000     328100
     7111 c                   if        wwPos2 > 0
                                    B03       000000     328200
     7112 c                   eval      wwCL=
   %trim(%subst(wwChain:wwPos:wwPos2))                          03
   000000     328300
     7113 c                   eval      peUseCL = *ON
                                    03       000000     328400
     7114 c                   endif
                                   E03       000000     328500
     7115 c                   endif
                                   E02       000000     328600
     7116 c                   endif
                                   E01       000000     328700
     7117 c                   eval      peCLen = atoll(wwCL)
                                              000000     328800
     7118
                                             000000     328900
     7119 c                   callp     debug_msg('recvdoc parms:
   '+%trim(peTE)+                                    000000     329000
     7120 c                                ' ' +
   %trim(%editc(peCLen:'P')))
   000000     329100
     7121
                                             000000     329200
     7122  *********************************************************
                                              000000     329300
     7123  * parse out www-authenticate: header:
                                              000000     329400
     7124  * (used when userid/password for actual site is required)
                                              000000     329500
     7125  *********************************************************
                                              000000     329600
     7126 c                   eval
   wwPos=%scan('www-authenticate:':wwChain)
        000000     329700
     7127 c                   if        wwPos > 0
                                   B01       000000     329800
     7128 c                   callp     interpret_auth(peRespChain:
   wwPos)                                 01       000000     329900
     7129 c                   endif
                                   E01       000000     330000
     7130
                                             000000     330100
     7131 c                   if        peAuthErr = *On
                                   B01       000000     330200
     7132 c                   callp     SetError(HTTP_NDAUTH:'This page
   requires' +                        01       000000     330300
     7133 c                               ' a user-id & password')
                                     01       000000     330400
     7134 c                   return    -1
                                     01       000000     330500
     7135 c                   endif
                                   E01       000000     330600
     7136
                                             000000     330700
     7137  *********************************************************
                                              000000     330800
     7138  * parse proxy-authenticate: header
                                             000000     330900
     7139  * (used when userid/password for proxy is required)
                                              000000     331000
     7140  * this header may occur more than once (especially on
                                              000000     331100
     7141  * MS ISA servers, where Kerberos, NTLM, Basic, etc.
                                              000000     331200
     7142  * may be provided)
                                             000000     331300
     7143  *********************************************************
                                              000000     331400
     7144 c                   eval      dsProxyAuthBasic = *off
                                             000000     331500
     7145 c                   eval      dsProxyAuthRealm = *blanks
                                              000000     331600
     7146 c                   eval
   wwPos=%scan(LF+'proxy-authenticate:':wwChain)
         000000     331700
     7147 c                   dow       wwPos > 0
                                   B01       000000     331800
     7148 c                   callp     interpret_proxy_auth(peRespChain:
   wwPos)                           01       000000     331900
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   133
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     7149 c                   eval
   wwPos=%scan(LF+'proxy-authenticate:':wwChain:                      01
         000000     332000
     7150 c                               wwPos+1)
                                     01       000000     332100
     7151 c                   enddo
                                   E01       000000     332200
     7152
                                             000000     332300
     7153 c                   if        peProxyAuthErr = *On
                                    B01       000000     332400
     7154 c                   callp     SetError(HTTP_PXNDAUTH:'This
   proxy ' +                             01       000000     332500
     7155 c                               ' requires a user-id &
   password')                                01       000000     332600
     7156 c                   return    -1
                                     01       000000     332700
     7157 c                   endif
                                   E01       000000     332800
     7158
                                             000000     332900
     7159  *********************************************************
                                              000000     333000
     7160  * parse out 'location:' header:
                                              000000     333100
     7161  *  (used for redirects)
                                              000000     333200
     7162  *********************************************************
                                              000000     333300
     7163 c                   eval      %len(wkRedirLoc) = 0
                                              000000     333400
     7164 c                   eval      wwPos = %scan(LF+'location:':
                                             000000     333500
     7165 c                                           wwChain)
                                              000000     333600
     7166 c                   if        wwPos > 0
                                   B01       000000     333700
     7167 c                   eval      wwPos = wwPos + 11
                                     01       000000     333800
     7168 c                   eval      wwPos2 =
   %scan(CRLF:wwChain:wwPos)                                 01
   000000     333900
     7169 c                   eval      wwPos2 = wwPos2 - wwPos
                                    01       000000     334000
     7170 c                   if        wwPos2 > 0
                                    B02       000000     334100
     7171 c                   eval      wkRedirLoc =
                                     02       000000     334200
     7172 c
   %trim(%subst(peRespChain:wwPos:wwPos2))                            02
         000000     334300
     7173 c                   endif
                                   E02       000000     334400
     7174 c                   endif
                                   E01       000000     334500
     7175
                                             000000     334600
     7176  *********************************************************
                                              000000     334700
     7177  * Call HTTP header parsing module
                                              000000     334800
     7178  *********************************************************
                                              000000     334900
     7179 c                   callp     header_parse(peRespChain: *NULL)
                                              000000     335000
     7180
                                             000000     335100
     7181 c                   if        use_cookies = *on
                                   B01       000000     335200
     7182 c                   callp     header_load_cookies(peHost:
   pePath)                                01       000000     335300
     7183 c                   endif
                                   E01       000000     335400
     7184
                                             000000     335500
     7185  *********************************************************
                                              000000     335600
     7186  * Call user supplied parsing proc if available
                                             000000     335700
     7187  *********************************************************
                                              000000     335800
     7188 c                   if        wkParseHdrProc <> *NULL
                                   B01       000000     335900
     7189 c                   callp     parse_hdrs(peRespChain:
   wkParseHdrdata)                            01       000000     336000
     7190 c                   endif
                                   E01       000000     336100
     7191 c                   if        wkParseHdrLong <> *NULL
                                   B01       000000     336200
     7192 c                   callp     parse_hdr_long( peRespChain
                                    01       000000     336300
     7193 c                                           :
   wkParseHdrLongData )                               01       000000
   336400
     7194 c                   endif
                                   E01       000000     336500
     7195
                                             000000     336600
     7196 c                   return    peRC
                                              000000     336700
     7197 P                 E
                                             000000     336800
     7198
                                             000000     336900
     7199
                                             000000     337000
     7200
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     337100
     7201  * http_set_100_timeout(): Set value for 100-continue timeouts.
                                             000000     337200
     7202  *
                                              000000     337300
     7203  * This API lets you change the timeout value that HTTPAPI
   waits                                          000000     337400
     7204  * for a "100 Continue" response from the server during a POST
                                              000000     337500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   134
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     7205  * request. Some servers send this response, others do not. By
                                              000000     337600
     7206  * default, HTTPAPI waits 0.5 seconds for a response, and if
   it's                                         000000     337700
     7207  * not received, sends the POST.
                                              000000     337800
     7208  *
                                              000000     337900
     7209  *   Set this to a low value (0.1?) when working with a server
                                              000000     338000
     7210  *   that does not send a "100 continue" response. That way,
   you                                          000000     338100
     7211  *   don't have to wait for the timeout.
                                              000000     338200
     7212  *
                                              000000     338300
     7213  *   Set it to a higher value (10.0?) when working with a
   server                                          000000     338400
     7214  *   whose responses are slower, but will definitely send the
                                             000000     338500
     7215  *   "100".  That way, HTTPAPI won't give up on the response
   and                                          000000     338600
     7216  *   get out of sync.
                                             000000     338700
     7217  *
                                              000000     338800
     7218
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     338900
     7219 P http_set_100_timeout...
                                             000000     339000
     7220 P                 B                   export
                                              000000     339100
     7221 D http_set_100_timeout...
                                             000000     339200
     7222 D                 PI
                                              000000     339300
     7223 D peTimeout                     10P 3 value
                                             000000     339400
     7224 c                   eval      wk100time = peTimeout
                                             000000     339500
     7225 P                 E
                                             000000     339600
     7226
                                             000000     339700
     7227
                                             000000     339800
     7228
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     339900
     7229  * http_use_cookies(): Turns on/off HTTPAPI's cookie parsing
   and                                          000000     340000
     7230  *                     caching routines.
                                              000000     340100
     7231  *
                                              000000     340200
     7232  *    peSetting = (input) *ON = HTTPAPI will read and send
   cookies                                        000000     340300
     7233  *                       *OFF = HTTPAPI will ignore cookies
                                             000000     340400
     7234  *                              (has no affect on cookies
   supplied                                        000000     340500
     7235  *                               via an exit procedure)
                                             000000     340600
     7236
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     340700
     7237 P http_use_cookies...
                                             000000     340800
     7238 P                 B                   export
                                              000000     340900
     7239 D http_use_cookies...
                                             000000     341000
     7240 D                 PI
                                              000000     341100
     7241 D   peSetting                    1N   const
                                             000000     341200
     7242 c                   eval      use_cookies = peSetting
                                             000000     341300
     7243 P                 E
                                             000000     341400
     7244
                                             000000     341500
     7245
   ****************************************************************
                                     000000     341600
     7246  * Proxy support
    *                                         000000     341700
     7247
   ****************************************************************
                                     000000     341800
     7248
                                             000000     341900
     7249
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     342000
     7250  *  http_proxy_setauth():   Set HTTP Proxy Authentication
   Information                                     000000     342100
     7251  *
                                              000000     342200
     7252  *     peAuthType = Authentication Type (HTTP_AUTH_NONE or
                                              000000     342300
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   135
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     7253  *                     HTTP_AUTH_BASIC)
                                             000000     342400
     7254  *     peUsername = UserName to use
                                             000000     342500
     7255  *     pePasswd   = Password to use
                                             000000     342600
     7256  *
                                              000000     342700
     7257  *  Returns -1 upon error, or 0 if successful
                                             000000     342800
     7258
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     342900
     7259 P http_proxy_setauth...
                                             000000     343000
     7260 P                 B                   export
                                              000000     343100
     7261 D http_proxy_setauth...
                                             000000     343200
     7262 D                 PI            10I 0
                                             000000     343300
     7263 D   peAuthType                   1A   const
                                             000000     343400
     7264 D   peUsername                  80A   const
                                             000000     343500
     7265 D   pePasswd                  1024A   const
                                             000000     343600
     7266
                                             000000     343700
     7267 D wwString        S           1105A
                                             000000     343800
     7268 D wwEncoded       S           1476A
                                             000000     343900
     7269 D wwEncLen        S             10I 0
                                             000000     344000
     7270
                                             000000     344100
     7271 c                   callp     debug_msg('http_proxy_setauth():
   entered')                                  000000     344200
     7272 c                   if        peAuthType<>HTTP_AUTH_BASIC
                                   B01       000000     344300
     7273 c                               and peAuthType<>HTTP_AUTH_NONE
                                    B01       000000     344400
     7274 c                   callp     SetError(HTTP_ATHTYP: 'Invalid
   authenti'+                          01       000000     344500
     7275 c                                   'cation type!')
                                    01       000000     344600
     7276 c                   return    -1
                                     01       000000     344700
     7277 c                   endif
                                   E01       000000     344800
     7278
                                             000000     344900
     7279 C*************************************************
                                              000000     345000
     7280 c* Calculate strings for NO authentication
                                              000000     345100
     7281 C*************************************************
                                              000000     345200
     7282 c                   if        peAuthType = HTTP_AUTH_NONE
                                   B01       000000     345300
     7283 c                   eval      dsProxyAuthType = HTTP_AUTH_NONE
                                     01       000000     345400
     7284 c                   eval      dsProxyAuthStr = ''
                                    01       000000     345500
     7285 c                   return    0
                                    01       000000     345600
     7286 c                   endif
                                   E01       000000     345700
     7287
                                             000000     345800
     7288 c                   if        %scan(':':peUserName) > 0
                                   B01       000000     345900
     7289 c                              or %scan(':': pePasswd) > 0
                                    B01       000000     346000
     7290 c                   callp     SetError(HTTP_ATHVAL: 'HTTP Proxy
   Auth '+                          01       000000     346100
     7291 c                               'values cannot contain a
   colon!')                                01       000000     346200
     7292 c                   return    -1
                                     01       000000     346300
     7293 c                   endif
                                   E01       000000     346400
     7294
                                             000000     346500
     7295 c                   eval      dsProxyAuthUser = peUserName
                                              000000     346600
     7296 c                   eval      dsProxyAuthPasswd = pePasswd
                                              000000     346700
     7297
                                             000000     346800
     7298 c                   eval      wwString = %trimr(peUserName) +
   ':' +                                       000000     346900
     7299 c                                        %trimr(pePasswd)
                                             000000     347000
     7300 c                   callp     http_xlate(
   %len(%trimr(wwString))                                          000000
       347100
     7301 c                                       : wwString
                                              000000     347200
     7302 c                                       : TO_ASCII )
                                              000000     347300
     7303
                                             000000     347400
     7304 c                   eval      wwEncLen =
   base64_encode(%addr(wwString):
   000000     347500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   136
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     7305 c
   %len(%trimr(wwString)):                                     000000
   347600
     7306 c                                             %addr(wwEncoded):
                                             000000     347700
     7307 c                                             %size(wwEncoded))
                                             000000     347800
     7308
                                             000000     347900
     7309 c                   eval      dsProxyAuthStr =
   %subst(wwEncoded:1:wwEncLen)                               000000
   348000
     7310 c                   eval      dsProxyAuthType = peAuthType
                                              000000     348100
     7311
                                             000000     348200
     7312 c                   return    0
                                             000000     348300
     7313 P                 E
                                             000000     348400
     7314
                                             000000     348500
     7315
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     348600
     7316  *  http_setproxy():   Set HTTP Proxy Address
                                             000000     348700
     7317  *
                                              000000     348800
     7318  *     peHost = Proxy host name
                                             000000     348900
     7319  *     psPort = Proxy port
                                              000000     349000
     7320  *
                                              000000     349100
     7321  *  Returns -1 upon error, or 0 if successful
                                             000000     349200
     7322
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     349300
     7323 P http_setproxy   B                   export
                                              000000     349400
     7324 D http_setproxy   PI            10I 0
                                             000000     349500
     7325 D   peHost                     256A   const
                                             000000     349600
     7326 D   pePort                      10I 0 const
                                             000000     349700
     7327
                                             000000     349800
     7328 c                   eval      dsProxyHost = peHost
                                              000000     349900
     7329 c                   eval      dsProxyPort = pePort
                                              000000     350000
     7330 c                   eval      dsProxyTun  = *off
                                              070611     350100
     7331
                                             000000     350200
     7332 c                   return    0
                                             000000     350300
     7333
                                             000000     350400
     7334 P                 E
                                             000000     350500
     7335
                                             000000     350600
     7336
                                             000000     350700
     7337
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     350800
     7338  *  http_proxy_getauth():   Get HTTP Proxy Authentication
   Information                                     000000     350900
     7339  *
                                              000000     351000
     7340  *   Call this proc after you receive a HTTP_PXNDAUTH error
                                             000000     351100
     7341  *   to determine the authentication credentials that are
   required                                        000000     351200
     7342  *
                                              000000     351300
     7343  *  The following parms are returned to your program:
                                             000000     351400
     7344  *
                                              000000     351500
     7345  *     peBasic = *ON if BASIC auth is allowed
                                             000000     351600
     7346  *     peRealm = Auth realm.  Present this to the user to
   identify                                        000000     351700
     7347  *               which password you're looking for.  For
   example                                          000000     351800
     7348  *               if peRealm is "secureproxy.com" you might say
                                              000000     351900
     7349  *               "enter password for secureproxy.com" to user.
                                              000000     352000
     7350  *
                                              000000     352100
     7351  *   After getting the userid & password from the user (or
   database)                                      000000     352200
     7352  *   you'll need to call http_proxy_setauth()
                                             000000     352300
     7353  *
                                              000000     352400
     7354  *  Returns -1 upon error, or 0 if successful
                                             000000     352500
     7355
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     000000     352600
     7356 P http_proxy_getauth...
                                             000000     352700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   137
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     7357 P                 B                   export
                                              000000     352800
     7358 D http_proxy_getauth...
                                             000000     352900
     7359 D                 PI            10I 0
                                             000000     353000
     7360 D   peBasic                      1N
                                             000000     353100
     7361 D   peRealm                    124A
                                             000000     353200
     7362
                                             000000     353300
     7363 c                   callp     debug_msg('http_proxy_getauth():
   entered')                                  000000     353400
     7364 c                   if        dsProxyAuthRealm = *blanks
                                    B01       000000     353500
     7365 c                   callp     SetError(HTTP_NOAUTH: 'Proxy did
   ' +                               01       000000     353600
     7366 c                              'not ask for authentication!')
                                    01       000000     353700
     7367 c                   return    -1
                                     01       000000     353800
     7368 c                   endif
                                   E01       000000     353900
     7369
                                             000000     354000
     7370 c                   eval      peBasic = dsProxyAuthBasic
                                              000000     354100
     7371 c                   eval      peRealm = dsProxyAuthRealm
                                              000000     354200
     7372
                                             000000     354300
     7373 c                   return    0
                                             000000     354400
     7374 P                 E
                                             000000     354500
     7375
                                             070611     354600
     7376
                                             070611     354700
     7377
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     070611     354800
     7378  * proxy_tunnel(): This establishes a tunnel through a proxy,
                                             070611     354900
     7379  *                 this lets us communicate directly with the
                                             070611     355000
     7380  *                 destination HTTP server (required for SSL)
                                             070611     355100
     7381  *
                                              070611     355200
     7382  *    peComm = Communication driver
                                             070611     355300
     7383  *    peServ = Service (http or https)
                                              070611     355400
     7384  *    peHost = destination (not proxy) host
                                             070611     355500
     7385  *    pePort = destination port number
                                              070611     355600
     7386  * peTimeout = timeout
                                              070611     355700
     7387  *
                                              070611     355800
     7388  * returns 0 if successful, otherwise an HTTP response number
                                             070611     355900
     7389  *         or -1 upon internal error
                                              070611     356000
     7390
   *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                     070611     356100
     7391 P proxy_tunnel    B
                                             070611     356200
     7392 D proxy_tunnel    PI            10I 0
                                             070611     356300
     7393 D   peComm                        *   value
                                             070611     356400
     7394 D   peServ                      32a   const
                                             070611     356500
     7395 D   peHost                     256a   const
                                             070611     356600
     7396 D   pePort                      10i 0 value
                                             070611     356700
     7397 D   peTimeout                   10i 0 value
                                             070611     356800
     7398
                                             070611     356900
     7399 D wwReq           S          32767A   varying
                                             070611     357000
     7400 D wwResp          s          32767A   varying
                                             070611     357100
     7401
                                             070611     357200
     7402 D rc              S             10I 0
                                             070611     357300
     7403 D wwPort          S             10I 0
                                             070611     357400
     7404 D wwTE            S             32A
                                             070611     357500
     7405 D wwClen          s             10U 0
                                             070611     357600
     7406 D wwUseCL         s              1N
                                             070611     357700
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   138
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     7407 D wwAuthErr       S              1N   inz(*OFF)
                                             070611     357800
     7408 D wwProxyAuthErr...
                                             070611     357900
     7409 D                 S              1N   inz(*OFF)
                                             070611     358000
     7410
                                             070611     358100
     7411  *************************************************
                                              070611     358200
     7412  * Create proxy tunnelling request string
                                             070611     358300
     7413  *************************************************
                                              070611     358400
     7414 c                   if        pePort=0
                                    B01       070611     358500
     7415 c                   if        peServ='https'
                                    B02       070611     358600
     7416 c                   eval      wwPort=443
                                     02       070611     358700
     7417 c                   else
                                    X02       070611     358800
     7418 c                   eval      wwPort=80
                                    02       070611     358900
     7419 c                   endif
                                   E02       070611     359000
     7420 c                   endif
                                   E01       070611     359100
     7421
                                             070611     359200
     7422 c                   eval      wwReq = 'CONNECT ' +
   %trim(peHost)                                          070611
   359300
     7423 c                                   + ':' +
   %trim(%editc(wwPort:'L'))                                     070611
     359400
     7424 c                                   + ' HTTP/1.1'
                                             070611     359500
     7425 C                                   + CRLF
                                              070611     359600
     7426
                                             070611     359700
     7427 c                   if        pePort = 0
                                    B01       070611     359800
     7428 c                   eval      wwReq = wwReq
                                    01       070611     359900
     7429 C                                   + 'Host: ' + %trim(peHost)
                                     01       070611     360000
     7430 c                                   + ' HTTP/1.1'
                                    01       070611     360100
     7431 C                                   + CRLF
                                     01       070611     360200
     7432 c                   else
                                    X01       070611     360300
     7433 c                   eval      wwReq = wwReq
                                    01       070611     360400
     7434 C                                   + 'Host: ' + %trim(peHost)
                                     01       070611     360500
     7435 c                                   + ':' +
   %trim(%editc(pePort:'L'))                            01       070611
     360600
     7436 c                                   + ' HTTP/1.1'
                                    01       070611     360700
     7437 C                                   + CRLF
                                     01       070611     360800
     7438 c                   endif
                                   E01       070611     360900
     7439
                                             070611     361000
     7440 c                   eval      wwReq = wwReq
                                             070611     361100
     7441 C                                   + 'User-Agent: ' +
   HTTP_USERAGENT                                     070611     361200
     7442 C                                   + CRLF
                                              070611     361300
     7443 c                                   + 'Proxy-Connection:
   keep-alive'                                      070611     361400
     7444 c                                   + CRLF
                                              070611     361500
     7445
                                             070611     361600
     7446 c                   if        dsProxyAuthType = HTTP_AUTH_BASIC
                                   B01       070611     361700
     7447 c                   eval      wwReq = wwReq
                                    01       070611     361800
     7448 c                                   + 'Proxy-Authorization:
   Basic '                              01       070611     361900
     7449 c                                   + dsProxyAuthStr + CRLF
                                    01       070611     362000
     7450 c                   endif
                                   E01       070611     362100
     7451
                                             070611     362200
     7452 C                   eval      wwReq = wwReq + CRLF
                                              070611     362300
     7453
                                             070611     362400
     7454  *************************************************
                                              070611     362500
     7455  * Send request to proxy server
                                             070611     362600
     7456  *************************************************
                                              070611     362700
     7457 c                   eval      rc = SendReq( peComm
                                              070611     362800
     7458 c                                         : %addr(wwReq)+2
                                              070611     362900
     7459 c                                         : %len(wwReq)
                                             070611     363000
     7460 c                                         : peTimeout )
                                             070611     363100
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   139
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     7461 c                   if        rc < 1
                                    B01       070611     363200
     7462 c                   return    rc
                                     01       070611     363300
     7463 c                   endif
                                   E01       070611     363400
     7464
                                             070611     363500
     7465  *************************************************
                                              070611     363600
     7466  * Receive & parse proxy server's response.
                                             070611     363700
     7467  *************************************************
                                              070611     363800
     7468 c                   eval      rc = RecvResp( peComm
                                             070611     363900
     7469 c                                          : wwResp
                                             070611     364000
     7470 c                                          : %size(wwResp)
                                              070611     364100
     7471 c                                          : peTimeout
                                              070611     364200
     7472 c                                          : *OFF )
                                             070611     364300
     7473 c                   if        rc < 1
                                    B01       070611     364400
     7474 c                   return    rc
                                     01       070611     364500
     7475 c                   endif
                                   E01       070611     364600
     7476
                                             070611     364700
     7477 c                   eval      rc = parse_resp_chain( wwResp
                                             070611     364800
     7478 c                                                  : rc
                                             070611     364900
     7479 c                                                  : wwTE
                                             070611     365000
     7480 c                                                  : wwCLen
                                             070611     365100
     7481 c                                                  : wwUseCL
                                              070611     365200
     7482 c                                                  : wwAuthErr
                                              070611     365300
     7483 c                                                  :
   wwProxyAuthErr                                       070611     365400
     7484 c                                                  :
   %trim(dsProxyHost)                                   070611     365500
     7485 c                                                  : '/' )
                                              070611     365600
     7486 c                   if        rc <> 200
                                   B01       070611     365700
     7487 c                   return    rc
                                     01       070611     365800
     7488 c                   endif
                                   E01       070611     365900
     7489
                                             070611     366000
     7490 c                   return    0
                                             070611     366100
     7491 P                 E
                                             070611     366200
     7492
                                             070611     366300
     7493
                                             000000     366400
     7494  /define ERRNO_LOAD_PROCEDURE
                                             000000     366500
     7495  /copy QRPGLESRC,ERRNO_H
                                              000000     366600

   *---------------------------------------------------------------------
   -----------------------*
           * Nombre de miembro RPG  . . :  ERRNO_H
                                  *                     8
           * Nombre externo . . . . . . :  LIBHTTP/QRPGLESRC(ERRNO_H)
                                 *                     8
           * Ultimo cambio  . . . . . . :  05/02/08  15:29:41
                                 *                     8
           * Texto descriptivo  . . . . :  Header for Error Handling in
   C/UNIX APIs                     *                     8

   *---------------------------------------------------------------------
   -----------------------*
     7496+/*-
                  +                          010715    8000100
     7497+ * Copyright (c) 2001-2008 Scott C. Klement
                  +                          080205    8000200
     7498+ * All rights reserved.
                  +                          010715    8000300
     7499+ *
                   +                          010715    8000400
     7500+ * Redistribution and use in source and binary forms, with or
   without          +                          010715    8000500
     7501+ * modification, are permitted provided that the following
   conditions          +                          010715    8000600
     7502+ * are met:
                  +                          010715    8000700
     7503+ * 1. Redistributions of source code must retain the above
   copyright           +                          010715    8000800
     7504+ *    notice, this list of conditions and the following
   disclaimer.            +                          010715    8000900
     7505+ * 2. Redistributions in binary form must reproduce the above
   copyright        +                          010715    8001000
     7506+ *    notice, this list of conditions and the following
   disclaimer in the      +                          010715    8001100
     7507+ *    documentation and/or other materials provided with the
   distribution.     +                          010715    8001200
     7508+ *
                   +                          010715    8001300
     7509+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS
   ''AS IS'' AND      +                          070828    8001400
     7510+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   LIMITED TO, THE       +                          010715    8001500
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   140
   Línea  <---------------------- Especificaciones del fuente
   ----------------------><--- Comentarios --> Do  Pág.  Cambio FuenSec.
   Número
   ....1....+....2....+....3....+....4....+....5....+....6....+....7....+
   ....8....+....9....+...10 Núm Lín.  Fecha  ID  Número
     7511+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
   PARTICULAR PURPOSE  +                          010715    8001600
     7512+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR
   CONTRIBUTORS BE LIABLE     +                          010715
   8001700
     7513+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   CONSEQUENTIAL  +                          010715    8001800
     7514+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   SUBSTITUTE GOODS     +                          010715    8001900
     7515+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   INTERRUPTION)       +                          010715    8002000
     7516+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   CONTRACT, STRICT  +                          010715    8002100
     7517+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   ARISING IN ANY WAY   +                          010715    8002200
     7518+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   POSSIBILITY OF      +                          010715    8002300
     7519+ * SUCH DAMAGE.
                  +                          010715    8002400
     7520+ *
                   +                          010715    8002500
     7521+ */
                  +                          010715    8002600
     7522+
                                              010715    8002700
     7523+
                                              010715    8002800
     7524+ ** ERRNO_H --  Header file for working with C-Runtime and
                                              010425    8002900
     7525+ **     UNIX-Type API error handling routines.
                                              010425    8003000
     7526+ **                                               SCK 04/25/01
                                              010425    8003100
     7527+ **
                                             010425    8003200
     7528+ **  To use this:
                                             010425    8003300
     7529+ **       1)  put a /COPY ERRNO_H in the D-specs of your
   program.                                         010425    8003400
     7530+ **       2)  put a "/define ERRNO_LOAD_PROCEDURE", followed by
   a                                         010425    8003500
     7531+ **               2nd "/COPY ERRNO_H" somewhere that procedures
                                             010425    8003600
     7532+ **               are allowed to be defined :)
                                              010425    8003700
     7533+ **       3)  bind to the QC2LE binding directory.
                                              010425    8003800
     7534+ **
                                             010425    8003900
     7535+ **
                                             010425    8004000
     7536+ /if not defined(ERRNO_LOAD_PROCEDURE)
                                              010425    8004100
               LINES EXCLUDED: 287
     7537+ /endif
                                             010628    8032900
     7538+
                                              010425    8033000
     7539+
   *-------------------------------------------------------------------
                                     010715    8033100
     7540+ * procedure definitions:
                                             010715    8033200
     7541+
   *-------------------------------------------------------------------
                                     010715    8033300
     7542+ /if not defined(SOCKUTIL_H)
                                              010628    8033400
     7543+ /if defined(ERRNO_LOAD_PROCEDURE)
                                              010425    8033500
     7544+P errno           B
                                             010425    8033600
     7545+D errno           PI            10I 0
                                             010425    8033700
     7546+D p_errno         S               *
                                             010425    8033800
     7547+D wwreturn        S             10I 0 based(p_errno)
                                              010425    8033900
     7548+C                   eval      p_errno = sys_errno
                                             070907    8034000
     7549+c                   return    wwreturn
                                              010425    8034100
     7550+P                 E
                                             010425    8034200
     7551+ /endif
                                             010425    8034300
     7552+ /endif
                                             010628    8034400
     7553+
                                              010628    8034500
     7554+ /define ERRNO_H
                                              010628    8034600
          * * * * *   F I N   D E   F U E N T E   * * * * *
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   141
          M e n s a j e s   d e   D i a g n ó s t i c o   A d i c i o n a
   l e s
    ID msje Gr Número Sec.    Texto de mensaje
   *RNF7030 30   6472 264300  El nombre o indicador P_STATDS no está
   definido.
   *RNF7030 30   6473 264400  El nombre o indicador ST_SIZE no está
   definido.
   *RNF5409 00   4663 082900  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   4726 089200  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   4751 091700  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   5143 130900  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   5151 131700  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   5160 132600  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   5260 142600  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   5295 146100  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   5299 146500  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   5959 213000  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   6042 221300  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   6147 231800  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   6267 243800  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   6422 259300  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF7542 30   6466 263700  No es válido el parámetro 2 como un
   parámetro pasado por
                              referencia.
   *RNF7503 30   6472 264300  La expresión contiene un operando que no se
   ha definido.
   *RNF7503 30   6473 264400  La expresión contiene un operando que no se
   ha definido.
   *RNF5409 00   6501 267200  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   6557 272800  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   6558 272900  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   6670 284100  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
   *RNF5409 00   7300 347100  La llamada con prototipo devuelve un valor
   que se pierde
                              cuando se utiliza CALLP.
    * * * * *   F I N   D E  M E N S A J E S   D E   D I A G N O S T I C
   O   A D I C I O N A L E S  * * * * *
                               M i e m b r o s   /C O P Y
   Línea  Fuen Nombre RPG <-------- Nombre externo ------> CCSID
   <-Ultimo cambio->
   Número ID              Biblioteca Archivo    Miembro           Fecha
    Hora
       63    1 HTTPAPI_H  LIBHTTP    QRPGLESRC  HTTPAPI_H     37
   24/02/10 09:53:38
       99    2 CONFIG_H   LIBHTTP    QRPGLESRC  CONFIG_H      37
   24/02/10 09:53:38
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   142
     2040    3 PRIVATE_H  LIBHTTP    QRPGLESRC  PRIVATE_H     37
   18/12/07 16:04:53
     2187    4 HEADER_H   LIBHTTP    QRPGLESRC  HEADER_H      37
   12/01/06 11:54:43
     2202    5 ERRNO_H    LIBHTTP    QRPGLESRC  ERRNO_H       37
   05/02/08 15:29:41
     2542    6 IFSIO_H    DPTLIB     QRPGLESRC  IFSIO_H       37
   18/02/10 10:46:20
     3779    7 COMM_H     LIBHTTP    QRPGLESRC  COMM_H        37
   05/02/08 15:29:06
     7495    8 ERRNO_H    LIBHTTP    QRPGLESRC  ERRNO_H       37
   05/02/08 15:29:41
            * * * * *  F I N   D E   M I E M B R O S   /C O P Y  * * * *
   *
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   143
                          R e f e r e n c i a s   C r u z a d a s
         Referencias de Archivo y Registro:
            Archivo           Dispos.            Referencias
   (D=Definidas)
              Registro
            No existen referencias en el fuente.
       Referencias de campo global:
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            ACC_ALL           CONST                2667D
            ACC_INVOKER       CONST                2665D
            ACC_OTHERS        CONST                2666D
            ACC_SELF          CONST                2664D
   *RNF7031 ACCESS            I(10,0)              3070D
                              PROTOTYPE
   *RNF7031 ACCESSX           I(10,0)              3082D
                              PROTOTYPE
            ADDL_HEADERS      PROTOTYPE            4034D   4293    4532
            ATOI              I(10,0)              2131D   4763    5832
                              PROTOTYPE
            ATOLL             I(20,0)              2134D   7117
                              PROTOTYPE
            BASE64_ENCODE     I(10,0)              2048D   5264    7304
                              PROTOTYPE
   *RNF7031 BASE64_INIT       PROTOTYPE            2045D
            CCSID_OR_CP       I(10,0)              3907D   5921    6003
    6494
   *RNF7031 CHDIR             I(10,0)              3093D
                              PROTOTYPE
   *RNF7031 CHMOD             I(10,0)              3101D
                              PROTOTYPE
   *RNF7031 CHOWN             I(10,0)              3110D
                              PROTOTYPE
            CLOSE             I(10,0)              3126D   5959    6042
    6501
                              PROTOTYPE            6557    6558
   *RNF7031 CLOSE_ICONV       PROTOTYPE            2167D
   *RNF7031 CLOSEDIR          I(10,0)              3136D
                              PROTOTYPE
            COMM_BLOCKREAD    I(10,0)              3871D   4939    4970
                              PROTOTYPE
            COMM_BLOCKWRITE   I(10,0)              3878D   4667    5018
    5091
                              PROTOTYPE
   *RNF7031 COMM_CLEANUP      N(1)                 3903D
                              PROTOTYPE
            COMM_CONNECT      N(1)                 3853D   6654
                              PROTOTYPE
            COMM_HANGUP       N(1)                 3899D   4134
                              PROTOTYPE
            COMM_LINEREAD     I(10,0)              3885D   4720    5137
                              PROTOTYPE
   *RNF7031 COMM_LINEWRITE    I(10,0)              3892D
                              PROTOTYPE
            COMM_NEW          *(16)                3842D   6301
                              PROTOTYPE
            COMM_READ         I(10,0)              3864D   4840
                              PROTOTYPE
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   144
            COMM_RESOLVE      *(16)                3845D   6641
                              PROTOTYPE
            COMM_UPGRADE      N(1)                 3859D   6679
                              PROTOTYPE
   *RNF7031 COMMDRIVER        DS(160)              3818D
                              BASED(P_COMMDRI+)
            COMMSSL_SETXPROC  PROTOTYPE            2182D   5653    5657
   *RNF7031 COMMTCP_CONNECTBLOCKING...
                              I(10,0)              2104D
                              PROTOTYPE
   *RNF7031 COMMTCP_CONNECTNONBLOCK...
                              I(10,0)              2109D
                              PROTOTYPE
   *RNF7031 COMMTCP_FD_ISSET  N(1)                 2119D
                              PROTOTYPE
   *RNF7031 COMMTCP_FD_SET    PROTOTYPE            2114D
   *RNF7031 COMMTCP_FD_ZERO   PROTOTYPE            2124D
            CP_CURJOB         CONST                2582D
            CP_ISO8859_1      CONST                2578D
            CP_MSDOS          CONST                2577D
            CP_UCS2           CONST                2581D
            CP_UTF8           CONST                2580D
            CP_WINDOWS        CONST                2579D
   *RNF7031 CREAT             I(10,0)              3146D
                              PROTOTYPE
            CRLF              CONST                4056D   4221    4225
    4229
                                                   4236    4243    4247
    4253
                                                   4259    4263    4270
    4278
                                                   4281    4297    4457
    4461
                                                   4465    4471    4475
    4482
                                                   4486    4493    4496
    4501
                                                   4504    4510    4517
    4521
                                                   4536    7425    7431
    7437
                                                   7442    7444    7449
    7452
            DEBUG_CLOSE       PROTOTYPE            2077D   4132
            DEBUG_MSG         PROTOTYPE            2074D   4123    4200
    4437
                                                   4709    4824    4907
    4916
                                                   4937    4943    4947
    5006
                                                   5063    5135    5162
    5195
                                                   5230    5325    5437
    5551
                                                   5722    5741    5750
    5912
                                                   5994    6459    6465
    6475
                                                   6489    6592    6747
    6909
                                                   7119    7271    7363
            DEBUG_SETPROC     PROTOTYPE            2066D   5632
   *RNF7031 DEBUG_WRITE       PROTOTYPE            2070D
   *RNF7031 DIRENT            DS(696)              3032D
                              BASED(TEMPLATE)
   *RNF7031   D_FILENO        U(10,0)              3037D
   *RNF7031   D_FILENO_GEN_ID U(10,0)              3036D
   *RNF7031   D_NAME          A(640)               3046D
   *RNF7031   D_NAMELEN       U(10,0)              3045D
   *RNF7031   D_NLS_CCSID     I(10,0)              3042D
   *RNF7031   D_NLS_CNTRY     A(2)                 3043D
   *RNF7031   D_NLS_LANG      A(3)                 3044D
              D_NLSINFO       A(12)                3041D   3042    3043
    3044
   *RNF7031   D_RECLEN        U(10,0)              3038D
   *RNF7031   D_RESERV1       A(16)                3034D
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   145
   *RNF7031   D_RESERV3       I(10,0)              3039D
   *RNF7031   D_RESERV4       A(8)                 3040D
            DO_GET            I(10,0)              3913D   4168    4169
    6812
                              PROTOTYPE
            DO_POST           I(10,0)              3928D   4389    4390
    6984
                              PROTOTYPE
            DOWNLOAD_STS      PROTOTYPE            4029D   4868    4961
   *RNF7031 DS_STATVFS        DS(160)              2934D   3264    3703
                              BASED(TEMPLATE)
   *RNF7031   F_BASETYPE      A(80)                2952D
   *RNF7031   F_BAVAIL        U(20,0)              2940D
   *RNF7031   F_BFREE         U(20,0)              2939D
   *RNF7031   F_BLOCKS        U(20,0)              2938D
   *RNF7031   F_BSIZE         U(10,0)              2936D
   *RNF7031   F_DIRLINKMAX    I(10,0)              2949D
   *RNF7031   F_FAVAIL        U(10,0)              2943D
   *RNF7031   F_FFREE         U(10,0)              2942D
   *RNF7031   F_FILES         U(10,0)              2941D
   *RNF7031   F_FLAG          U(10,0)              2945D
   *RNF7031   F_FRSIZE        U(10,0)              2937D
   *RNF7031   F_FSID          U(10,0)              2944D
   *RNF7031   F_FSID64        U(20,0)              2951D
   *RNF7031   F_NAMEMAX       U(10,0)              2946D
   *RNF7031   F_OBJLINKMAX    I(10,0)              2948D
   *RNF7031   F_PATHMAX       U(10,0)              2947D
   *RNF7031   F_RESERVED1     A(4)                 2950D
            DSAUTH            DS(3017)             4064D   4097    5291
    6828M
                                                   7004M
            DSAUTHBASIC       N(1)                 4066D   5202    5439M
     5495M
            DSAUTHCNONCE      A(16)                4072D   5353M   5375
    5400
                                                   5446M
            DSAUTHDIGEST      N(1)                 4067D   5203    5294
    5440M
                                                   5441M   5498M
            DSAUTHNC          P(7,0)               4073D   5354M   5354
    5374
                                                   5399    5517M
            DSAUTHNONCE       A(128)               4069D   5373    5380
    5392
                                                   5438    5443M   5515M
     5516
            DSAUTHOPAQUE      A(128)               4070D   5404    5406
    5444M
                                                   5524M
            DSAUTHPASSWD      A(1024)              4075D   5256M   5358
            DSAUTHQOP         A(32)                4071D   5371    5396
    5445M
                                                   5509M
            DSAUTHREALM       A(124)               4068D   5196    5204
    5293
                                                   5357    5391    5442M
     5503M
            DSAUTHSTR         A(1476)              4076D   4243    4517
    5244M
                              VARYING(2)           5269M
            DSAUTHTYPE        A(1)                 4065D   4240    4244
    4514
                                                   4518    5243M   5270M
            DSAUTHUSER        A(80)                4074D   5255M   5356
    5390
   *RNF7031 DSPROXY           DS(2053)             4092D
   *RNF7031 DSPROXYAUTH       DS(2708)             4078D
            DSPROXYAUTHBASIC  N(1)                 4082D   5585M   7144M
     7370
            DSPROXYAUTHPASSWD A(1024)              4088D   7296M
            DSPROXYAUTHREALM  A(124)               4084D   5595M   7145M
     7364
                                                   7371
            DSPROXYAUTHSTR    A(1476)              4090D   4236    4510
    7284M
                              VARYING(2)           7309M   7449
            DSPROXYAUTHTYPE   A(1)                 4080D   4232    4506
    7283M
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   146
                                                   7310M   7446
            DSPROXYAUTHUSER   A(80)                4086D   7295M
            DSPROXYHOST       A(2048)              4093D   4207    4443
    6618
                                                   6619    6626    7328M
     7484
            DSPROXYPORT       I(10,0)              4094D   6622    6623
    7329M
            DSPROXYTUN        N(1)                 4095D   4208    4233
    4444
                                                   4507    6628M   6630M
     6664
                                                   7330M
   *RNF7031 DUP               I(10,0)              3155D
                              PROTOTYPE
   *RNF7031 DUP2              I(10,0)              3163D
                              PROTOTYPE
            EACCES            CONST                2313D
            EADDRINUSE        CONST                2335D
            EADDRNOTAVAIL     CONST                2337D
            EAFNOSUPPORT      CONST                2339D
            EAGAIN            CONST                2323D
            EALREADY          CONST                2341D
            EBADDATA          CONST                2290D
            EBADF             CONST                2397D
            EBADFID           CONST                2467D
            EBADFUNC          CONST                2286D
            EBADKEYLN         CONST                2300D
            EBADMODE          CONST                2276D
            EBADNAME          CONST                2274D
            EBADOPT           CONST                2292D
            EBADPOS           CONST                2278D
            EBADSEEK          CONST                2272D
            EBUSY             CONST                2511D
            ECHILD            CONST                2475D
            ECLOSED           CONST                2333D
            ECONNABORTED      CONST                2343D
            ECONNREFUSED      CONST                2345D
            ECONNRESET        CONST                2347D
            ECONVERT          CONST                2443D
            EDAMAGE           CONST                2431D
            EDATALINK         CONST                2499D
            EDEADLK           CONST                2407D
            EDESTADDRREQ      CONST                2349D
            EDESTROYED        CONST                2413D
            EDOM              CONST                2252D
            EEXIST            CONST                2405D
            EFAULT            CONST                2327D
            EFBIG             CONST                2459D
            EFILECVT          CONST                2465D
            EGETANDPUT        CONST                2304D
            EHOSTDOWN         CONST                2351D
            EHOSTUNREACH      CONST                2353D
            EIDRM             CONST                2461D
            EILSEQ            CONST                2447D
            EINPROGRESS       CONST                2355D
            EINTR             CONST                2325D
            EINVAL            CONST                2505D
            EIO               CONST                2507D
            EIOERROR          CONST                2306D
            EIORECERR         CONST                2308D
            EISCONN           CONST                2357D
            EISDIR            CONST                2423D
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   147
            EITERBAD          CONST                2429D
            EJOURNALED        CONST                2495D
            EJRNDAMAGE        CONST                2483D
            EJRNENTTOOLONG    CONST                2497D
            EJRNINACTIVE      CONST                2485D
            EJRNRCVSPC        CONST                2487D
            EJRNRMT           CONST                2489D
            ELOCKED           CONST                2457D
            ELOOP             CONST                2433D
            EMFILE            CONST                2399D
            EMLINK            CONST                2417D
            EMSGSIZE          CONST                2359D
            ENAMETOOLONG      CONST                2435D
            ENETDOWN          CONST                2361D
            ENETRESET         CONST                2363D
            ENETUNREACH       CONST                2365D
            ENEWJRN           CONST                2493D
            ENEWJRNRCV        CONST                2491D
            ENFILE            CONST                2401D
            ENOBUFS           CONST                2367D
            ENODEV            CONST                2509D
            ENOENT            CONST                2513D
            ENOLCK            CONST                2437D
            ENOMEM            CONST                2409D
            ENOMSG            CONST                2463D
            ENOPOS            CONST                2280D
            ENOPROTOOPT       CONST                2369D
            ENOREC            CONST                2288D
            ENOSPC            CONST                2317D
            ENOSYS            CONST                2421D
            ENOSYSRSC         CONST                2441D
            ENOTCONN          CONST                2371D
            ENOTDIR           CONST                2315D
            ENOTDLT           CONST                2296D
            ENOTEMPTY         CONST                2439D
            ENOTENROLL        CONST                2451D
            ENOTOPEN          CONST                2258D
            ENOTREAD          CONST                2260D
            ENOTSAFE          CONST                2479D
            ENOTSIGINIT       CONST                2473D
            ENOTSOCK          CONST                2373D
            ENOTSUP           CONST                2375D
            ENOTUPD           CONST                2294D
            ENOTWRITE         CONST                2264D
            ENUMMBRS          CONST                2282D
            ENUMRECS          CONST                2284D
            ENXIO             CONST                2331D
            EOFFLINE          CONST                2453D
            EOPNOTSUPP        CONST                2377D
            EOVERFLOW         CONST                2481D
            EOWNERTERM        CONST                2411D
            EPAD              CONST                2298D
            EPERM             CONST                2515D
            EPFNOSUPPORT      CONST                2379D
            EPIPE             CONST                2403D
            EPROTONOSUPPORT   CONST                2382D
            EPROTOTYPE        CONST                2384D
            EPUTANDGET        CONST                2302D
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   148
            ERANGE            CONST                2254D
            ERCVDERR          CONST                2386D
            ERECIO            CONST                2262D
            EROFS             CONST                2425D
            EROOBJ            CONST                2455D
            ERRNO             I(10,0)              2529D   4855    5925
    6007
                              PROTOTYPE            6468    6479    6500
    7544
                                                   7545
            ESHUTDOWN         CONST                2388D
            ESOCKTNOSUPPORT   CONST                2391D
            ESOFTDAMAGE       CONST                2449D
            ESPIPE            CONST                2419D
            ESRCH             CONST                2471D
            ESTALE            CONST                2469D
            ESTDERR           CONST                2270D
            ESTDIN            CONST                2266D
            ESTDOUT           CONST                2268D
            ETERM             CONST                2415D
            ETIME             CONST                2329D
            ETIMEDOUT         CONST                2393D
            ETOOMANYREFS      CONST                2477D
            ETRUNC            CONST                2256D
            EUNATCH           CONST                2395D
            EUNKNOWN          CONST                2427D
            EWOULDBLOCK       CONST                2321D
            EXDEV             CONST                2319D
            E2BIG             CONST                2445D
            F_OK              CONST                2650D
   *RNF7031 FACCESSX          I(10,0)              3173D
                              PROTOTYPE
   *RNF7031 FCHDIR            I(10,0)              3185D
                              PROTOTYPE
   *RNF7031 FCHMOD            I(10,0)              3194D
                              PROTOTYPE
   *RNF7031 FCHOWN            I(10,0)              3203D
                              PROTOTYPE
   *RNF7031 FCNTL             I(10,0)              3219D
                              PROTOTYPE
   *RNF7031 FDSET             A(28)                2127D
                              BASED(TEMPLATE)
            FILE_CCSID        I(10,0)              2094D   5922    6004
    6496
                              PROTOTYPE
   *RNF7031 FPATHCONF         I(10,0)              3231D
                              PROTOTYPE
   *RNF7031 FSTAT             I(10,0)              3240D
                              PROTOTYPE
   *RNF7031 FSTATVFS          I(10,0)              3262D
                              PROTOTYPE
   *RNF7031 FSTAT64           I(10,0)              3249D
                              PROTOTYPE
   *RNF7031 FSYNC             I(10,0)              3271D
                              PROTOTYPE
   *RNF7031 FTRUNCATE         I(10,0)              3279D
                              PROTOTYPE
   *RNF7031 FTRUNCATE64       I(10,0)              3288D
                              PROTOTYPE
            GET_CHUNK_SIZE    I(10,0)              3990D   4915    5119
    5120
                              PROTOTYPE
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   149
   *RNF7031 GET_SYMBOLS       A(25)                2176D
                              PROTOTYPE
   *RNF7031 GETCWD            *(16)                3297D
                              PROTOTYPE
   *RNF7031 GETEGID           U(10,0)              3306D
                              PROTOTYPE
   *RNF7031 GETEUID           U(10,0)              3313D
                              PROTOTYPE
   *RNF7031 GETGID            U(10,0)              3320D
                              PROTOTYPE
   *RNF7031 GETGRGID          *(16)                3327D
                              PROTOTYPE
   *RNF7031 GETGRNAM          *(16)                3335D
                              PROTOTYPE
   *RNF7031 GETGROUPS         *(16)                3343D
                              PROTOTYPE
   *RNF7031 GETPWNAM          *(16)                3356D
                              PROTOTYPE
   *RNF7031 GETPWUID          *(16)                3368D
                              PROTOTYPE
   *RNF7031 GETUID            U(10,0)              3376D
                              PROTOTYPE
   *RNF7031 GROUP             DS(4128)             2966D
                              BASED(TEMPLATE)
   *RNF7031   GR_GID          U(10,0)              2969D
   *RNF7031   GR_MEM(256)     *(16)                2970D
   *RNF7031   GR_NAME         *(16)                2968D
            HEADER_GET_REQ_COOKIES...
                              A(32767)             2198D   4287    4526
                              VARYING(2)
                              PROTOTYPE
            HEADER_LOAD_COOKIES...
                              PROTOTYPE            2193D   7182
            HEADER_PARSE      PROTOTYPE            2188D   7179
            HTTP_ACCES        CONST                1798D
            HTTP_ASCII        CONST                 162D
            HTTP_ATHTYP       CONST                1830D   5234    7274
            HTTP_ATHVAL       CONST                1832D   5250    7290
            HTTP_AUTH_BASIC   CONST                1922D   4232    4240
    4506
                                                   4514    5231    5295
    7272
                                                   7446
            HTTP_AUTH_MD5_DIGEST...
                              CONST                1924D   4244    4518
    5232
                                                   5299
            HTTP_AUTH_NONE    CONST                1920D   4065    4080
    5233
                                                   5242    5243    7273
    7282
                                                   7283
            HTTP_BADCHK       CONST                1792D
            HTTP_BADCNN       CONST                1765D
            HTTP_BADPNT       CONST                1851D   5662
            HTTP_BADURL       CONST                1755D   5768    5779
    5790
                                                   5837
            HTTP_BRRECV       CONST                1845D
            HTTP_BRSELE       CONST                1847D
            HTTP_BRTIME       CONST                1843D   4727    5144
   *RNF7031 HTTP_BUILD_SOCKADDR...
                              I(10,0)               425D
                              PROTOTYPE
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   150
            HTTP_BWSELE       CONST                1869D
            HTTP_BWSEND       CONST                1867D
            HTTP_BWTIME       CONST                1871D
            HTTP_BWTIMO       CONST                1883D
            HTTP_CCSID        CONST                 175D
            HTTP_CHKSIZ       CONST                1794D
            HTTP_CKDUMP       CONST                1897D
            HTTP_CKOPEN       CONST                1899D
            HTTP_CKSTAT       CONST                1901D
            HTTP_CLOSE        I(10,0)               439D   4118    4119
    7028
                              PROTOTYPE
            HTTP_CNNTIMO      CONST                1767D
   *RNF7031 HTTP_COMP         PROTOTYPE            1605D
            HTTP_CONTTYPE     CONST                 143D   4486
            HTTP_CONVERR      CONST                1903D
            HTTP_COOKIE_DEFAULT...
                              CONST                 205D   4112
   *RNF7031 HTTP_COOKIE_FILE  PROTOTYPE            1596D
   *RNF7031 HTTP_CRASH        PROTOTYPE            1622D
            HTTP_CSSELE       CONST                1824D
   *RNF7031 HTTP_DEBUG        PROTOTYPE            1375D
   *RNF7031 HTTP_DEBUG_FILE   A(500)                211D
                              VARYING(2)
   *RNF7031 HTTP_DIAG         PROTOTYPE            1614D
            HTTP_EBCDIC       CONST                 161D
            HTTP_ERROR        A(80)                 451D   4197    4336
    4433
                              PROTOTYPE            4583    4626    4726
    5143
            HTTP_FDOPEN       CONST                1800D   5924    6006
    6478
                                                   6499
            HTTP_FDSTAT       CONST                1887D   6467
   *RNF7031 HTTP_GET          I(10,0)               260D
                              PROTOTYPE
   *RNF7031 HTTP_GET_XML      I(10,0)               919D
                              PROTOTYPE
   *RNF7031 HTTP_GET_XMLTF    I(10,0)               958D
                              PROTOTYPE
            HTTP_GETAUTH      I(10,0)               550D   5189    5190
                              PROTOTYPE
            HTTP_GSKAPPID     CONST                1802D
            HTTP_GSKATYP      CONST                1804D
            HTTP_GSKENVI      CONST                1806D
            HTTP_GSKENVO      CONST                1808D
            HTTP_GSKKEYF      CONST                1893D
            HTTP_GSKSTYP      CONST                1810D
   *RNF7031 HTTP_HEADER       A(32500)             1565D
                              VARYING(2)
                              PROTOTYPE
            HTTP_HOSTNF       CONST                1757D
            HTTP_IFOPEN       CONST                1891D
            HTTP_IFSMODE      CONST                 190D   5922    6004
    6495
            HTTP_ILLSWC       CONST                1909D
            HTTP_INVPTR       CONST                1863D
            HTTP_LONG_PARSEURL...
                              I(10,0)               783D   5700    5703
    6607
                              PROTOTYPE            6798    6949
            HTTP_LRRECV       CONST                1873D
            HTTP_LRSELE       CONST                1875D
            HTTP_LRTIME       CONST                1877D
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   151
   *RNF7031 HTTP_MFD_ENCODER_ADDSTMF...
                              N(1)                 1348D
                              PROTOTYPE
   *RNF7031 HTTP_MFD_ENCODER_ADDVAR...
                              N(1)                 1311D
                              PROTOTYPE
   *RNF7031 HTTP_MFD_ENCODER_ADDVAR_S...
                              N(1)                 1329D
                              PROTOTYPE
   *RNF7031 HTTP_MFD_ENCODER_CLOSE...
                              PROTOTYPE            1362D
   *RNF7031 HTTP_MFD_ENCODER_OPEN...
                              *(16)                1293D
                              PROTOTYPE
            HTTP_MUTABLE      CONST                1895D
            HTTP_NDAUTH       CONST                1828D   7132
            HTTP_NOAUTH       CONST                1834D   5197    7365
            HTTP_NOCDRIV      CONST                1881D   6294
            HTTP_NODATA       CONST                1861D
            HTTP_NOMEM        CONST                1859D
            HTTP_NONBLK       CONST                1763D
            HTTP_NOSPAC       CONST                1865D
            HTTP_NOTREG       CONST                1826D
            HTTP_NOTSUPP      CONST                1879D   4126
   *RNF7031 HTTP_PARSE_XML_STMF...
                              I(10,0)              1545D
                              PROTOTYPE
   *RNF7031 HTTP_PARSE_XML_STRING...
                              I(10,0)              1742D
                              PROTOTYPE
   *RNF7031 HTTP_PARSER_GET_END_CB...
                              *(16) PROCPTR        1713D
                              PROTOTYPE
   *RNF7031 HTTP_PARSER_GET_START_CB...
                              *(16) PROCPTR        1704D
                              PROTOTYPE
   *RNF7031 HTTP_PARSER_GET_USERDATA...
                              *(16)                1722D
                              PROTOTYPE
   *RNF7031 HTTP_PARSER_SWITCH_CB...
                              I(10,0)              1691D
                              PROTOTYPE
   *RNF7031 HTTP_PARSEURL     I(10,0)               402D
                              PROTOTYPE
            HTTP_PERSIST_CLOSE...
                              I(10,0)              1270D   6147    6267
    6422
                              PROTOTYPE            6670    7023    7026
            HTTP_PERSIST_GET  I(10,0)              1196D   6098    6103
    6109
                              PROTOTYPE            6116    6124    6133
    6711
                                                   6714
            HTTP_PERSIST_OPEN *(16)                1164D   6083    6085
    6188
                              PROTOTYPE            6190    6344    6346
    6573
                                                   6576
            HTTP_PERSIST_POST I(10,0)              1247D   6203    6213
    6224
                              PROTOTYPE            6237    6250    6359
    6369
                                                   6380    6392    6405
    6870
                                                   6873
            HTTP_POINT_ADDL_HEADER...
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   152
                              CONST                1974D   5639
            HTTP_POINT_CERT_VAL...
                              CONST                2015D   5652
            HTTP_POINT_DEBUG  CONST                1939D   5631
            HTTP_POINT_DOWNLOAD_STATUS...
                              CONST                1963D   5636
            HTTP_POINT_GSKIT_CERT_VAL...
                              CONST                2032D   5656
            HTTP_POINT_PARSE_HDR_LONG...
                              CONST                1994D   5645    5648
            HTTP_POINT_PARSE_HEADER...
                              CONST                1984D   5642
            HTTP_POINT_UPLOAD_STATUS...
                              CONST                1951D   5633
   *RNF7031 HTTP_POST         I(10,0)               300D
                              PROTOTYPE
   *RNF7031 HTTP_POST_STMF    I(10,0)               868D
                              PROTOTYPE
   *RNF7031 HTTP_POST_STMF_XML...
                              I(10,0)              1097D
                              PROTOTYPE
   *RNF7031 HTTP_POST_STMF_XMLTF...
                              I(10,0)              1141D
                              PROTOTYPE
   *RNF7031 HTTP_POST_XML     I(10,0)              1013D
                              PROTOTYPE
   *RNF7031 HTTP_POST_XMLTF   I(10,0)              1057D
                              PROTOTYPE
            HTTP_PROXY_GETAUTH...
                              I(10,0)               621D   7356    7359
                              PROTOTYPE
            HTTP_PROXY_SETAUTH...
                              I(10,0)               596D   7259    7262
                              PROTOTYPE
            HTTP_PST417       CONST                1837D
            HTTP_PXNDAUTH     CONST                1907D   7154
            HTTP_RDCRLF       CONST                1849D   4975
            HTTP_RDRECV       CONST                1783D
            HTTP_RDSELE       CONST                1785D
            HTTP_RDTIME       CONST                1841D
            HTTP_RDWERR       CONST                1788D   4853    4856
    4954
            HTTP_REDIR_LOC    A(1024)               652D   5677    5678
                              VARYING(2)
                              PROTOTYPE
            HTTP_REGERR       CONST                1812D
            HTTP_RESP         CONST                1781D   4776    4779
            HTTP_RRRECV       CONST                1777D
            HTTP_RRSELE       CONST                1779D
            HTTP_RRTIME       CONST                1839D
            HTTP_SAALLO       CONST                1759D
            HTTP_SDSELE       CONST                1822D
            HTTP_SDSEND       CONST                1790D
            HTTP_SELECT_COMMDRIVER...
                              *(16)                 801D   6280    6283
    6636
                              PROTOTYPE
            HTTP_SET_100_TIMEOUT...
                              PROTOTYPE            1505D   7219    7222
            HTTP_SETATTR      CONST                1905D
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   153
            HTTP_SETAUTH      I(10,0)               566D   5220    5221
    5295
                              PROTOTYPE            5299
   *RNF7031 HTTP_SETCCSIDS    I(10,0)              1391D
                              PROTOTYPE
   *RNF7031 HTTP_SETFILECCSID PROTOTYPE            1430D
            HTTP_SETPROXY     I(10,0)               580D   7323    7324
                              PROTOTYPE
   *RNF7031 HTTP_SETTABLES    I(10,0)              1407D
                              PROTOTYPE
            HTTP_SOCERR       CONST                1761D
            HTTP_SRSELE       CONST                1771D
            HTTP_SRXLATE      CONST                1769D
            HTTP_SRXMIT       CONST                1774D
            HTTP_SSLGCI       CONST                1911D
            HTTP_SSLVAL       CONST                1913D
            HTTP_SSOPEN       CONST                1814D
            HTTP_SSPROT       CONST                1853D
            HTTP_SSPSET       CONST                1857D
            HTTP_SSPUNK       CONST                1855D
            HTTP_SSSNFD       CONST                1816D
            HTTP_SSSNTO       CONST                1818D
            HTTP_SSTIMO       CONST                1820D
            HTTP_STMF_CALC    CONST                1553D
            HTTP_SWCERR       CONST                1885D   5078    5085
   *RNF7031 HTTP_TEMPFILE     A(40)                1630D
                              VARYING(2)
                              PROTOTYPE
            HTTP_TIMEOUT      CONST                 130D   6601    6757
    6918
   *RNF7031 HTTP_URL_ENCODER  *(16)                 664D    666     685
     703
                                                    724     742     758
   *RNF7031 HTTP_URL_ENCODER_ADDVAR...
                              N(1)                  684D
                              PROTOTYPE
   *RNF7031 HTTP_URL_ENCODER_ADDVAR_S...
                              N(1)                  757D
                              PROTOTYPE
   *RNF7031 HTTP_URL_ENCODER_FREE...
                              N(1)                  741D
                              PROTOTYPE
   *RNF7031 HTTP_URL_ENCODER_GETPTR...
                              PROTOTYPE             702D
   *RNF7031 HTTP_URL_ENCODER_GETSTR...
                              A(32767)              723D
                              VARYING(2)
                              PROTOTYPE
   *RNF7031 HTTP_URL_ENCODER_NEW...
                              *(16)                 666D
                              PROTOTYPE
            HTTP_URL_GET      I(10,0)               268D   5899    5900
                              PROTOTYPE
            HTTP_URL_GET_RAW  I(10,0)               341D   5935    5938
    5941
                              PROTOTYPE            5945    5949    5953
    6063
                                                   6066
   *RNF7031 HTTP_URL_GET_XML  I(10,0)               930D
                              PROTOTYPE
            HTTP_URL_POST     I(10,0)               309D   5980    5981
                              PROTOTYPE
            HTTP_URL_POST_RAW I(10,0)               373D   6017    6021
    6025
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   154
                              PROTOTYPE            6030    6035    6167
    6170
            HTTP_URL_POST_RAW2...
                              I(10,0)               827D   6322    6325
    6511
                              PROTOTYPE            6518    6526    6535
    6545
            HTTP_URL_POST_STMF...
                              I(10,0)               860D   6441    6444
                              PROTOTYPE
   *RNF7031 HTTP_URL_POST_STMF_XML...
                              I(10,0)              1108D
                              PROTOTYPE
   *RNF7031 HTTP_URL_POST_XML I(10,0)              1025D
                              PROTOTYPE
            HTTP_USE_COOKIES  PROTOTYPE            1580D   7237    7240
            HTTP_USERAGENT    CONST                 136D   4263    4475
    7441
            HTTP_XFRENC       CONST                1796D   7092
            HTTP_XLATE        I(10,0)              1444D   5151    5260
    7300
                              PROTOTYPE
            HTTP_XLATEDYN     I(10,0)              1478D   6965
                              PROTOTYPE
            HTTP_XLATEP       I(10,0)              1461D   4663    4751
                              PROTOTYPE
            HTTP_XML_CALC     CONST                1552D
   *RNF7031 HTTP_XML_SETCCSIDS...
                              I(10,0)              1520D
                              PROTOTYPE
            HTTP_XMLERR       CONST                1889D
   *RNF7031 HTTP_XMLNS        PROTOTYPE            1639D
   *RNF7031 HTTP_XMLRETURNPTR PROTOTYPE            1653D
   *RNF7031 HTTP_XMLSTRIPCRLF PROTOTYPE            1669D
            HTTP_XPROC        I(10,0)               640D   5618    5619
                              PROTOTYPE
            HTTPAPI_RELDATE   CONST                  97D
            HTTPAPI_VERSION   CONST                  95D
            HTTPDATE          A(29)                2091D   4251
                              PROTOTYPE
   *RNF7031 HTTPS_CLEANUP     I(10,0)               503D
                              PROTOTYPE
   *RNF7031 HTTPS_DCM_REG     I(10,0)               492D
                              PROTOTYPE
   *RNF7031 HTTPS_IDNAME      A(50)                 514D
                              VARYING(2)
                              PROTOTYPE
   *RNF7031 HTTPS_INIT        I(10,0)               472D
                              PROTOTYPE
   *RNF7031 HTTPS_STRICT      PROTOTYPE             524D
   *RNF7031 ICONVDYN          I(10,0)              2170D
                              PROTOTYPE
            INTERPRET_AUTH    PROTOTYPE            3994D   5416    5417
    7128
            INTERPRET_PROXY_AUTH...
                              PROTOTYPE            3999D   5536    5539
    7148
   *RNF7031 IOCTL             I(10,0)              3383D
                              PROTOTYPE
   *RNF7031 IOVEC             DS(20)               3057D   3634    3776
                              BASED(P_IOVEC)
   *RNF7031   IOV_BASE        *(16)                3059D
   *RNF7031   IOV_LEN         U(10,0)              3060D
   *RNF7031 LCHOWN            I(10,0)              3397D
                              PROTOTYPE
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   155
   *RNF7031 LINK              I(10,0)              3407D
                              PROTOTYPE
            LOWER             CONST                4058D   5488    5581
    5775
                                                   7073
   *RNF7031 LSEEK             I(10,0)              3416D
                              PROTOTYPE
   *RNF7031 LSEEK64           I(20,0)              3426D
                              PROTOTYPE
   *RNF7031 LSTAT             I(10,0)              3440D
                              PROTOTYPE
   *RNF7031 LSTAT64           I(10,0)              3453D
                              PROTOTYPE
            M_RDONLY          CONST                2707D
            M_RDWR            CONST                2708D
            M_RWX             CONST                2709D
            MD5               N(1)                 2079D   5359    5366
    5384
                              PROTOTYPE
   *RNF7031 MEMCPY            *(16)                2139D
                              PROTOTYPE
            MKDIGEST          A(32767)             4003D   4247    4521
    5314
                              VARYING(2)           5315
                              PROTOTYPE
   *RNF7031 MKDIR             I(10,0)              3462D
                              PROTOTYPE
   *RNF7031 MKFIFO            I(10,0)              3472D
                              PROTOTYPE
   *RNF7031 NEW_ICONV         A(52)                2163D
                              PROTOTYPE
            O_APPEND          CONST                2608D
            O_CCSID           CONST                2603D   3907
            O_CODEPAGE        CONST                2626D
            O_CREAT           CONST                2596D   5921    6003
    6493
            O_DSYNC           CONST                2612D
            O_EXCL            CONST                2600D
            O_INHERITMODE     CONST                2637D
            O_LARGEFILE       CONST                2640D
            O_NOCTTY          CONST                2616D
            O_RDONLY          CONST                2590D   6476
            O_RDWR            CONST                2594D
            O_RSYNC           CONST                2614D
            O_SHARE_NONE      CONST                2624D
            O_SHARE_RDONLY    CONST                2618D
            O_SHARE_RDWR      CONST                2622D
            O_SHARE_WRONLY    CONST                2620D
            O_SYNC            CONST                2610D
            O_TEXT_CREAT      CONST                2634D
            O_TEXTDATA        CONST                2628D
            O_TRUNC           CONST                2605D   5921    6003
    6492
            O_WRONLY          CONST                2592D   5921    6003
    6491
            OPEN              I(10,0)              3482D   5920    6002
    6476
                              PROTOTYPE            6490
   *RNF7031 OPENDIR           *(16)                3513D
                              PROTOTYPE
   *RNF7031 OPEN64            I(10,0)              3499D
                              PROTOTYPE
   *RNF7031 OS_RELEASE        A(6)                 2178D
                              PROTOTYPE
            P_COMMBLOCKREAD   *(16) PROCPTR        3828D   3871
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   156
            P_COMMBLOCKWRITE  *(16) PROCPTR        3830D   3878
            P_COMMCLEANUP     *(16) PROCPTR        3838D   3903
            P_COMMCONNECT     *(16) PROCPTR        3822D   3853
            P_COMMDRIVER      *(16)                3817D   3818    6301M
     6302
            P_COMMHANGUP      *(16) PROCPTR        3836D   3899
            P_COMMLINEREAD    *(16) PROCPTR        3832D   3885    3892
   *RNF7031 P_COMMLINEWRITE   *(16) PROCPTR        3834D
            P_COMMNEW         *(16) PROCPTR        3840D   3842    6288M
     6291M
            P_COMMREAD        *(16) PROCPTR        3826D   3864
            P_COMMRESOLVE     *(16) PROCPTR        3820D   3845
            P_COMMUPGRADE     *(16) PROCPTR        3824D   3859
            P_IOVEC           *(16)                3058
   *RNF7030 P_STATDS          **NO DEF**           6472M
            PARSE_HDR_LONG    PROTOTYPE            4042D   7192
            PARSE_HDRS        PROTOTYPE            4038D   7189
            PARSE_RESP_CHAIN  I(10,0)              4008D   4321    4569
    4611
                              PROTOTYPE            7035    7038    7477
   *RNF7031 PASSWD            DS(64)               2989D
                              BASED(TEMPLATE)
   *RNF7031   PW_DIR          *(16)                2994D
   *RNF7031   PW_GID          U(10,0)              2993D
   *RNF7031   PW_NAME         *(16)                2991D
   *RNF7031   PW_SHELL        *(16)                2995D
   *RNF7031   PW_UID          U(10,0)              2992D
   *RNF7031 PATHCONF          I(10,0)              3521D
                              PROTOTYPE
            PC_CHOWN_RESTRICTED...
                              CONST                2748D
            PC_LINK_MAX       CONST                2750D
            PC_MAX_CANON      CONST                2752D
            PC_MAX_INPUT      CONST                2754D
            PC_NAME_MAX       CONST                2756D
            PC_NO_TRUNC       CONST                2758D
            PC_PATH_MAX       CONST                2760D
            PC_PIPE_BUF       CONST                2762D
            PC_THREAD_SAFE    CONST                2766D
            PC_VDISABLE       CONST                2764D
   *RNF7031 PERROR            PROTOTYPE            2525D
   *RNF7031 PIPE              I(10,0)              3531D
                              PROTOTYPE
   *RNF7031 PREAD             I(10,0)              3542D
                              PROTOTYPE
   *RNF7031 PREAD64           I(10,0)              3556D
                              PROTOTYPE
            PROXY_TUNNEL      I(10,0)              4046D   6665    7391
    7392
                              PROTOTYPE
   *RNF7031 PWRITE            I(10,0)              3570D
                              PROTOTYPE
   *RNF7031 PWRITE64          I(10,0)              3584D
                              PROTOTYPE
   *RNF7031 QP0FPTOS          PROTOTYPE            3594D
            R_OK              CONST                2651D
   *RNF7031 READ              I(10,0)              3604D
                              PROTOTYPE
   *RNF7031 READDIR           *(16)                3614D
                              PROTOTYPE
   *RNF7031 READLINK          I(10,0)              3622D
                              PROTOTYPE
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   157
   *RNF7031 READV             I(10,0)              3632D
                              PROTOTYPE
            RECVCHUNK         I(10,0)              3968D   4342    4634
    4887
                              PROTOTYPE            4888
            RECVDOC           I(10,0)              3960D   4345    4637
    4798
                              PROTOTYPE            4799
            RECVRESP          I(10,0)              3953D   4309    4549
    4602
                              PROTOTYPE            4686    4687    7468
   *RNF7031 RENAME            I(10,0)              3650D
                              PROTOTYPE
   *RNF7031 REWINDDIR         PROTOTYPE            3660D
   *RNF7031 RMDIR             I(10,0)              3669D
                              PROTOTYPE
            S_IRGRP           CONST                2687D
            S_IROTH           CONST                2692D
            S_IRUSR           CONST                2682D
            S_IRWXG           CONST                2690D
            S_IRWXO           CONST                2695D
            S_IRWXU           CONST                2685D
            S_ISGID           CONST                2700D
            S_ISUID           CONST                2702D
            S_ISVTX           CONST                2698D
            S_IWGRP           CONST                2688D
            S_IWOTH           CONST                2693D
            S_IWUSR           CONST                2683D
            S_IXGRP           CONST                2689D
            S_IXOTH           CONST                2694D
            S_IXUSR           CONST                2684D
            SC_CCSID          CONST                2780D
            SC_CLK_TCK        CONST                2772D
            SC_NGROUPS_MAX    CONST                2774D
            SC_OPEN_MAX       CONST                2776D
            SC_PAGE_SIZE      CONST                2782D
            SC_PAGESIZE       CONST                2784D
            SC_STREAM_MAX     CONST                2778D
            SEEK_CUR          CONST                2716D
            SEEK_END          CONST                2717D
            SEEK_SET          CONST                2715D
            SENDDOC           I(10,0)              3974D   4990    4991
                              PROTOTYPE
            SENDRAW           I(10,0)              3982D   5044    5045
                              PROTOTYPE
            SENDREQ           I(10,0)              3947D   4301    4541
    4654
                              PROTOTYPE            4655    7457
            SETERROR          PROTOTYPE            2087D   4126    4353
    4645
                                                   4776    4779    4825
    4853
                                                   4856    4954    4975
    5078
                                                   5085    5197    5234
    5250
                                                   5662    5768    5779
    5790
                                                   5837    5924    6006
    6294
                                                   6467    6478    6499
    7092
                                                   7132    7154    7274
    7290
                                                   7365
            SETURLAUTH        PROTOTYPE            4020D   5281    5282
    6807
                                                   6958
            ST_CASE_SENSITITIVE...
                              CONST                2730D
            ST_CHOWN_RESTRICTED...
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   158
                              CONST                2732D
            ST_DYNAMIC_MOUNT  CONST                2736D
            ST_NO_EXPORTS     CONST                2740D
            ST_NO_MOUNT_OVER  CONST                2738D
            ST_NOSUID         CONST                2728D
            ST_RDONLY         CONST                2726D
   *RNF7030 ST_SIZE           **NO DEF**           6473
            ST_SYNCHRONOUS    CONST                2742D
            ST_THREAD_SAFE    CONST                2734D
            STAT              I(10,0)              3677D   6466
                              PROTOTYPE
   *RNF7031 STATDS            DS(128)              2818D   3242    3442
    3679
                              BASED(TEMPLATE)      6457
   *RNF7031   ST_ALLOCSIZE    U(10,0)              2832D
   *RNF7031   ST_ATIME        I(10,0)              2827D
   *RNF7031   ST_BLKSIZE      U(10,0)              2831D
   *RNF7031   ST_CCSID        U(5,0)               2836D
   *RNF7031   ST_CODEPAGE     U(5,0)               2835D
   *RNF7031   ST_CTIME        I(10,0)              2829D
   *RNF7031   ST_DEV          U(10,0)              2830D
   *RNF7031   ST_DEV64        U(20,0)              2840D
   *RNF7031   ST_GID          U(10,0)              2825D
   *RNF7031   ST_INO          U(10,0)              2821D
   *RNF7031   ST_INO_GEN_ID   U(10,0)              2842D
   *RNF7031   ST_MODE         U(10,0)              2820D
   *RNF7031   ST_MTIME        I(10,0)              2828D
   *RNF7031   ST_NLINK        U(5,0)               2822D
   *RNF7031   ST_NLINK32      U(10,0)              2838D
   *RNF7031   ST_OBJTYPE      A(11)                2833D
   *RNF7031   ST_RDEV         U(10,0)              2837D
   *RNF7031   ST_RDEV64       U(20,0)              2839D
   *RNF7031   ST_RESERVED1    A(36)                2841D
   *RNF7031   ST_RESERVED2    U(5,0)               2823D
   *RNF7031   ST_RESERVED3    A(1)                 2834D
   *RNF7031   ST_SIZE         I(10,0)              2826D
   *RNF7031   ST_UID          U(10,0)              2824D
   *RNF7031 STATDS64          DS(128)              2877D   3251    3455
    3689
                              BASED(TEMPLATE)
   *RNF7031   ST_ALLOCSIZE    U(20,0)              2891D
   *RNF7031   ST_ATIME        I(10,0)              2884D
   *RNF7031   ST_BLKSIZE      U(10,0)              2888D
   *RNF7031   ST_CCSID        U(5,0)               2900D
   *RNF7031   ST_CODEPAGE     U(5,0)               2890D
   *RNF7031   ST_CTIME        I(10,0)              2886D
   *RNF7031   ST_DEV          U(10,0)              2887D
   *RNF7031   ST_DEV64        U(20,0)              2897D
   *RNF7031   ST_GID          U(10,0)              2882D
   *RNF7031   ST_INO          U(10,0)              2880D
   *RNF7031   ST_INO_GEN_ID   U(10,0)              2892D
   *RNF7031   ST_MODE         U(10,0)              2879D
   *RNF7031   ST_MTIME        I(10,0)              2885D
   *RNF7031   ST_NLINK        U(5,0)               2889D
   *RNF7031   ST_NLINK32      U(10,0)              2898D
   *RNF7031   ST_OBJTYPE      A(11)                2893D
   *RNF7031   ST_RDEV         U(10,0)              2895D
   *RNF7031   ST_RDEV64       U(20,0)              2896D
   *RNF7031   ST_RESERVED1    A(26)                2899D
   *RNF7031   ST_RESERVED2    A(5)                 2894D
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   159
   *RNF7031   ST_SIZE         I(20,0)              2883D
   *RNF7031   ST_UID          U(10,0)              2881D
   *RNF7031 STATVFS           I(10,0)              3701D
                              PROTOTYPE
   *RNF7031 STAT64            I(10,0)              3687D
                              PROTOTYPE
            STRERROR          *(16)                2522D   5925    6007
    6468
                              PROTOTYPE            6479    6500
   *RNF7031 SYMLINK           I(10,0)              3710D
                              PROTOTYPE
            SYS_ERRNO         *(16)                2520D   7548
                              PROTOTYPE
   *RNF7031 SYSCONF           I(10,0)              3719D
                              PROTOTYPE
            TEMPLATE          *(16)                2127    2819    2878
    2935
                                                   2967    2990    3008
    3033
            TO_ASCII          CONST                2038D   4665    5262
    6967
                                                   7302
            TO_EBCDIC         CONST                2039D   4753    5153
   *RNF7031 TS_FREE           PROTOTYPE            2152D
   *RNF7031 TS_MALLOC         *(16)                2146D
                              PROTOTYPE
   *RNF7031 TS_REALLOC        *(16)                2149D
                              PROTOTYPE
   *RNF7031 UMASK             U(10,0)              3727D
                              PROTOTYPE
   *RNF7031 UNLINK            I(10,0)              3737D
                              PROTOTYPE
            UPLOAD_STS        PROTOTYPE            4024D   5027    5102
            UPPER             CONST                4057D   5488    5581
    5775
                                                   7073
   *RNF7031 URL_ENCODE        PROTOTYPE            2059D
   *RNF7031 URL_ENCODE_PRE    I(10,0)              2054D
                              PROTOTYPE
            USE_COOKIES       N(1)                 4112D   4285    4524
    7181
                                                   7242M
   *RNF7031 UTIL_DIAG         N(1)                 2084D
                              PROTOTYPE
   *RNF7031 UTIMBUF           DS(8)                3007D   3747
                              BASED(TEMPLATE)
   *RNF7031   ACTIME          I(10,0)              3009D
   *RNF7031   MODTIME         I(10,0)              3010D
   *RNF7031 UTIME             I(10,0)              3745D
                              PROTOTYPE
            W_OK              CONST                2652D
            WKADDHDRDATA      *(16)                4104D   4293    4532
    5641M
            WKADDHDRPROC      *(16) PROCPTR        4034    4103D   4292
    4531
                                                   5640M
            WKDWNLPROC        *(16) PROCPTR        4029    4101D   4867
    4959
                                                   5637M
            WKDWNLUDATA       *(16)                4102D   4869    4961
    5638M
            WKPARSEHDRDATA    *(16)                4106D   5644M   7189
            WKPARSEHDRLONG    *(16) PROCPTR        4042    4107D   5646M
     5649M
                                                   7191
            WKPARSEHDRLONGDATA...
                              *(16)                4109D   5647M   5650M
     7193
            WKPARSEHDRPROC    *(16) PROCPTR        4038    4105D   5643M
     7188
            WKREDIRLOC        A(1024)              4062D   5679    7163M
     7171M
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   160
                              VARYING(2)
            WKSAVEAUTH        A(3017)              4097D   5287M   5291M
     6827
                                                   6828    6829M   7003
    7004
                                                   7005M
            WKUPLPROC         *(16) PROCPTR        4024    4099D   5026
    5101
                                                   5634M
            WKUPLUDATA        *(16)                4100D   5029    5104
    5635M
            WK100TIME         P(10,3)              4111D   4552    7224M
   *RNF7031 WRITE             I(10,0)              3754D
                              PROTOTYPE
   *RNF7031 WRITEA            I(10,0)              3764D
                              PROTOTYPE
   *RNF7031 WRITEV            I(10,0)              3774D
                              PROTOTYPE
            X_OK              CONST                2653D
   *RNF7031 XALLOC            *(16)                2155D
                              PROTOTYPE
            XDEALLOC          PROTOTYPE            2157D   7009
   *RNF7031 XML_XLATE         I(10,0)              2096D
                              PROTOTYPE
   *RNF7031 XREALLOC          *(16)                2159D
                              PROTOTYPE
   Referencias de campo para subprocedimiento HTTP_CLOSE
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PECOMM            *(16)                4121D   4134
   *RNF7031 PESOCK            I(10,0)              4120D
   Referencias de campo para subprocedimiento DO_GET
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PEABSPATH         A(32767)             4174D   4220    4247
    4288
                              VARYING(2)           4329
            PECOMM            *(16)                4171D   4301    4309
    4342
                                                   4345
            PECONTENTTYPE     A(64)                4178D   4266    4267
    4269
            PEFILE            I(10,0)              4172D   4343    4346
            PEHOST            A(256)               4175D   4210    4222
    4287
                                                   4328
            PEMODTIME         Z(26)                4176D   4250    4251
            PEPORT            I(10,0)              4180D   4211    4213
    4224
                                                   4228
            PESAVEPROC        *(16) PROCPTR        4170D   4342    4345
            PESECURE          N(1)                 4181D   4289
            PESERV            A(32)                4182D   4209
            PESOAPACTION      A(64)                4179D   4274    4275
    4277
            PETIMEOUT         I(10,0)              4173D   4304    4312
    4343
                                                   4346
            PEUSERAGENT       A(64)                4177D   4256    4257
    4259
            RC                I(10,0)              4188D   4301M   4305
    4306
                                                   4309M   4314    4315
    4321M
                                                   4322    4331    4331
    4331
                                                   4332    4335    4342M
     4345M
                                                   4350    4351
            WWADDLHDR         A(1024)              4185D   4293    4294
                              VARYING(2)
            WWAUTHERR         N(1)                 4190D   4326
            WWCLEN            U(10,0)              4193D   4324    4346
            WWERRORMSG        A(80)                4197D   4336M   4353
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   161
            WWERRORNO         I(10,0)              4196D   4336    4353
            WWFINRC           I(10,0)              4195D   4335M   4350
    4354
            WWMODSTRING       A(29)                4187D   4251M   4253
            WWPATHPFX         A(1024)              4198D   4209M   4212M
     4212
                              VARYING(2)           4216M   4220
            WWPROXYAUTHERR    N(1)                 4192D   4327
            WWREQCHAIN        A(32767)             4184D   4219M   4225M
     4225
                              VARYING(2)           4227M   4227    4234M
     4234
                                                   4241M   4241    4245M
     4245
                                                   4252M   4252    4258M
     4258
                                                   4262M   4262    4268M
     4268
                                                   4276M   4276    4280M
     4280
                                                   4286M   4286    4294M
     4294
                                                   4297M   4297    4302
    4303
            WWRESPCHAIN       A(32767)             4186D   4310    4311
    4321
                              VARYING(2)
            WWTE              A(32)                4189D   4323    4341
            WWUSECL           N(1)                 4194D   4325    4347
   Referencias de campo para subprocedimiento DO_POST
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PEABSPATH         A(32767)             4398D   4456    4521
    4527
                              VARYING(2)           4577    4619
            PECOMM            *(16)                4395D   4541    4549
    4592
                                                   4602    4634    4637
            PECONTENTTYPE     A(64)                4401D   4478    4479
    4481
            PEFILE            I(10,0)              4396D   4635    4638
            PEHOST            A(256)               4399D   4446    4458
    4526
                                                   4576    4618
            PEPORT            I(10,0)              4405D   4447    4449
    4460
                                                   4464
            PEPOSTDATA        *(16)                4393D   4593
            PEPOSTDATALEN     I(10,0)              4394D   4504    4594
            PEPOSTFD          I(10,0)              4404D   4597
            PEPOSTPROC        *(16) PROCPTR        4403D   4596
            PESAVEPROC        *(16) PROCPTR        4391D   4634    4637
            PESECURE          N(1)                 4406D   4528
            PESENDPROC        *(16) PROCPTR        4392D   4409
            PESERV            A(32)                4407D   4445
            PESOAPACTION      A(64)                4402D   4489    4490
    4492
            PETIMEOUT         I(10,0)              4397D   4544    4595
    4605
                                                   4635    4638
            PEUSERAGENT       A(64)                4400D   4468    4469
    4471
            RC                I(10,0)              4421D   4541M   4545
    4546
                                                   4549M   4554    4555
    4562
                                                   4569M   4570    4578
    4578
                                                   4578    4579    4582
    4592M
                                                   4598    4599    4602M
     4607
                                                   4608    4611M   4612
    4621
                                                   4621    4621    4622
    4625
                                                   4634M   4637M   4642
    4643
            SENDPROC          I(10,0)              4409D   4592
                              PROTOTYPE
            WWADDLHDR         A(1024)              4419D   4532    4533
                              VARYING(2)
            WWAUTHERR         N(1)                 4425D   4574    4616
   *RNF7031 WWCL              A(32)                4429D
            WWCLEN            U(10,0)              4428D   4572    4614
    4638
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   162
   *RNF7031 WWERR             I(10,0)              4434D
            WWERRORMSG        A(80)                4433D   4565M   4583M
     4626M
                                                   4645
            WWERRORNO         I(10,0)              4432D   4583    4626
    4645
            WWFINRC           I(10,0)              4431D   4564M   4582M
     4590
                                                   4625M   4642    4646
   *RNF7031 WWMODSTRING       A(29)                4420D
            WWPATHPFX         A(1024)              4435D   4445M   4448M
     4448
                              VARYING(2)           4452M   4456
   *RNF7031 WWPOS             I(10,0)              4422D
   *RNF7031 WWPOS2            I(10,0)              4423D
            WWPROXYAUTHERR    N(1)                 4427D   4575    4617
            WWREQCHAIN        A(32767)             4417D   4455M   4461M
     4461
                              VARYING(2)           4463M   4463    4470M
     4470
                                                   4474M   4474    4480M
     4480
                                                   4485M   4485    4491M
     4491
                                                   4495M   4495    4500M
     4500
                                                   4502M   4502    4508M
     4508
                                                   4515M   4515    4519M
     4519
                                                   4525M   4525    4533M
     4533
                                                   4536M   4536    4542
    4543
            WWRESPCHAIN       A(32767)             4418D   4550    4551
    4569
                              VARYING(2)           4603    4604    4611
            WWTE              A(32)                4424D   4571    4613
    4633
            WWUSECL           N(1)                 4430D   4573    4615
    4639
   Referencias de campo para subprocedimiento SENDREQ
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            P_DEREF           *(16)                4660D   4661
            PECOMM            *(16)                4656D   4667
            PEDATA            *(16)                4657D   4664    4668
            PEDATALEN         I(10,0)              4658D   4663    4669
            PETIMEOUT         I(10,0)              4659D   4670
   *RNF7031 WWDEREF           A(1)                 4661D
                              BASED(P_DEREF)
   Referencias de campo para subprocedimiento RECVRESP
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            CR                A(1)                 4707D   4775    4777
   *RNF7031 FOREVER           N(1)                 4701D
            P_CHECK           *(16)                4698D   4699    4739M
     4759M
                                                   4761M
   *RNF7031 P_SAVEADDR        *(16)                4697D
            PECOMM            *(16)                4688D   4720
            PERESPCHAIN       A(32767)             4689D   4713    4715M
     4747M
                              VARYING(2)           4752    4758    4759
    4761
                                                   4775    4776    4777
    4779
            PERESPLEN         I(10,0)              4690D   4714
            PETIMEOUT         P(10,3)              4691D   4723
            PEUSE100          N(1)                 4692D   4766
            REPEATING         N(1)                 4702D   4711    4768M
     4770M
                                                   4772M
            WWCHECK           A(4)                 4699D   4740    4763
                              BASED(P_CHECK)
            WWERR             I(10,0)              4706D   4726    4727
            WWLEFT            I(10,0)              4705D   4714M   4715
    4718
                                                   4722    4735M   4735
            WWLEN             I(10,0)              4696D   4716M   4736M
     4736
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   163
                                                   4738    4747    4750
    4751
   *RNF7031 WWMICROSECS       I(10,0)              4704D
            WWPOS             *(16)                4694D   4713M   4721
    4734M
                                                   4734    4739
            WWREC             I(10,0)              4695D   4720M   4725
    4734
                                                   4735    4736
            WWRESPCODE        I(10,0)              4700D   4763M   4766
    4769
                                                   4769    4784
   *RNF7031 WWSECS            I(10,0)              4703D
   Referencias de campo para subprocedimiento RECVDOC
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            FOREVER           N(1)                 4813D   4838
   *RNF7031 P_SAVEADDR        *(16)                4815D
            PECLEN            U(10,0)              4804D   4834    4862
    4868
            PECOMM            *(16)                4800D   4840
            PEFD              I(10,0)              4802D   4849
            PEPROCEDURE       *(16) PROCPTR        4801D   4807
            PETIMEOUT         I(10,0)              4803D   4843
            PEUSECL           N(1)                 4805D   4828    4834
    4862
            RC                I(10,0)              4818D   4849M   4852
            SAVEPROC          I(10,0)              4807D   4849
                              PROTOTYPE
   *RNF7031 WWCHUNK           I(10,0)              4820D
   *RNF7031 WWCHUNKED         N(1)                 4819D
            WWDATA            A(8192)              4812D   4841    4842
    4850
   *RNF7031 WWERR             I(10,0)              4814D
            WWLEN             I(10,0)              4817D   4840M   4845
    4851
                                                   4852    4861
            WWRECEIVED        U(10,0)              4821D   4826M   4861M
     4861
                                                   4862    4868
            WWRET             I(10,0)              4822D   4829M   4831M
     4846
   *RNF7031 WWTIMEOUT         A(8)                 4816D
   Referencias de campo para subprocedimiento RECVCHUNK
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            FOREVER           N(1)                 4900D   4910
            PECOMM            *(16)                4889D   4915    4939
    4970
            PEFD              I(10,0)              4891D   4951
            PEPROCEDURE       *(16) PROCPTR        4890D   4894
            PETIMEOUT         I(10,0)              4892D   4915    4942
    4973
            RC                I(10,0)              4901D   4951M   4953
            SAVEPROC          I(10,0)              4894D   4951
                              PROTOTYPE
            WWCRLF            A(2)                 4904D   4971    4972
    4974
            WWDATA            A(8192)              4899D   4932    4940
    4951
            WWLEFT            I(10,0)              4902D   4915M   4917
    4919
                                                   4921    4923    4930
    4933
                                                   4934    4964M   4964
            WWRECEIVED        U(10,0)              4905D   4908M   4960M
     4960
                                                   4961
            WWRECSIZE         I(10,0)              4903D   4932M   4933
    4934M
                                                   4941    4942    4948
    4952
                                                   4953    4960    4964
   Referencias de campo para subprocedimiento SENDDOC
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PECOMM            *(16)                4992D   5018
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   164
            PEPOSTDATA        *(16)                4993D   5008
            PEPOSTDATALEN     I(10,0)              4994D   5009    5027
    5028
            PETIMEOUT         I(10,0)              4995D   5021
   *RNF7031 PEUNUSED1         *(16) PROCPTR        4996D
   *RNF7031 PEUNUSED2         I(10,0)              4997D
            WWCHUNK           I(10,0)              5004D   5013M   5014
    5015M
                                                   5020
   *RNF7031 WWERR             I(10,0)              5002D
            WWLEFT            I(10,0)              5000D   5009M   5011
    5013
                                                   5023M   5023    5027
            WWPOS             *(16)                4999D   5008M   5019
    5024M
                                                   5024
            WWSENT            I(10,0)              5003D   5018M   5023
    5024
   *RNF7031 WWTIMEOUT         A(8)                 5001D
   Referencias de campo para subprocedimiento SENDRAW
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            CALLBACK          I(10,0)              5053D   5073
                              PROTOTYPE
            PECOMM            *(16)                5046D   5091
            PEDATASIZE        I(10,0)              5048D   5066    5069
    5070
                                                   5103
            PEPOSTFD          I(10,0)              5051D   5073
            PEPOSTPROC        *(16) PROCPTR        5050D   5053
            PETIMEOUT         I(10,0)              5049D   5094
   *RNF7031 PEUNUSED1         *(16)                5047D
            WWBUF             A(8192)              5059D   5068    5074
    5092
            WWLEN             I(10,0)              5058D   5073M   5077
    5084
                                                   5093    5095    5099
            WWNEED            I(10,0)              5061D   5068M   5069
    5070M
                                                   5075    5084
            WWSENT            I(10,0)              5060D   5064M   5066
    5099M
                                                   5099    5102    5109
   Referencias de campo para subprocedimiento GET_CHUNK_SIZE
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PECOMM            *(16)                5121D   5137
            PETIMEOUT         I(10,0)              5122D   5140
            RC                I(10,0)              5130D   5155M   5156
    5157
            SSCANF            I(10,0)              5124D   5160
                              PROTOTYPE
            WWBUF             A(15)                5131D   5138    5139
    5152
                                                   5155    5157M   5157
    5160
            WWCHUNKSIZE       U(10,0)              5132D   5160    5163
    5165
            WWERR             I(10,0)              5133D   5143    5144
            WWLEN             I(10,0)              5129D   5137M   5142
    5151
   Referencias de campo para subprocedimiento HTTP_GETAUTH
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PEBASIC           N(1)                 5191D   5202M
            PEDIGEST          N(1)                 5192D   5203M
            PEREALM           A(124)               5193D   5204M
   Referencias de campo para subprocedimiento HTTP_SETAUTH
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PEAUTHTYPE        A(1)                 5222D   5231    5232
    5233
                                                   5242    5270
            PEPASSWD          A(1024)              5224D   5249    5256
    5259
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   165
            PEUSERNAME        A(80)                5223D   5248    5255
    5258
            WWENCLEN          I(10,0)              5228D   5264M   5269
            WWENCODED         A(1476)              5227D   5266    5267
    5269
            WWSTRING          A(1105)              5226D   5258M   5260
    5261
                                                   5264    5265
   Referencias de campo para subprocedimiento SETURLAUTH
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PEPASSWD          A(1024)              5284D   5286    5297
    5301
            PEUSERNAME        A(80)                5283D   5285    5296
    5300
   Referencias de campo para subprocedimiento MKDIGEST
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PEMETHOD          A(4)                 5316D   5364
            PEURI             A(32767)             5317D   5365    5393
                              VARYING(2)
            WWA1              A(32)                5321D   5359    5372
    5379
            WWA2              A(32)                5322D   5366    5377
    5381
            WWRESP            A(32)                5323D   5384    5394
            WWRET             A(32767)             5319D   5389M   5397M
     5397
                              VARYING(2)           5405M   5405    5409
            WWWORK            A(32767)             5320D   5356M   5359
    5359
                              VARYING(2)           5364M   5366    5366
    5372M
                                                   5379M   5384    5384
   Referencias de campo para subprocedimiento INTERPRET_AUTH
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            LF                A(1)                 5431D   5455
            P_NEXT            *(16)                5427D   5472M   5480
    5484M
            P_WORD            *(16)                5426D   5480M   5481
    5486
                                                   5501M   5502    5503
    5507M
                                                   5508    5509    5513M
     5514
                                                   5515    5522M   5523
    5524
            PEKWDPOS          I(10,0)              5419D   5451    5452M
     5464
                                                   5469    5471
            PERESPCHAIN       A(2048)              5418D   5451    5455
    5461
                                                   5470
            STRTOK            *(16)                5433D   5480    5501
    5507
                              PROTOTYPE            5513    5522
            TAB               CONST                5429D   5454    5480
            WWAUTH            A(2048)              5422D   5470M   5472
            WWCH              A(1)                 5421D   5454    5454
    5461M
            WWLEN             I(10,0)              5425D   5469M   5471
            WWORIGNONCE       A(128)               5430D   5438M   5516
            WWPOS1            I(10,0)              5423D   5451M   5452
    5456
                                                   5457    5460M   5464
    5469
            WWPOS2            I(10,0)              5424D   5455M   5457
    5460
                                                   5461
            WWWORD            A(30)                5428D   5486M   5488
    5488M
                                                   5491    5494    5497
    5500
                                                   5506    5512    5521
   Referencias de campo para subprocedimiento INTERPRET_PROXY_AUTH
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            LF                A(1)                 5549D   5560
            PEKWDPOS          I(10,0)              5541D   5556    5557M
     5569
                                                   5574    5576
            PERESPCHAIN       A(2048)              5540D   5556    5560
    5566
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   166
                                                   5575    5581    5595
            TAB               CONST                5548D   5559
            WWAUTH            A(2048)              5544D   5575M   5581M
     5583
                                                   5588    5592
            WWCH              A(1)                 5543D   5559    5559
    5566M
            WWLEN             I(10,0)              5547D   5574M   5576
    5594M
                                                   5596
            WWPOS1            I(10,0)              5545D   5556M   5557
    5561
                                                   5562    5565M   5569
    5574
                                                   5583M   5584    5588M
     5589
                                                   5590    5591M   5591
    5592
                                                   5593    5594    5596
            WWPOS2            I(10,0)              5546D   5560M   5562
    5565
                                                   5566    5592M   5593
    5594
   Referencias de campo para subprocedimiento HTTP_XPROC
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PEEXITPOINT       I(10,0)              5620D   5631    5633
    5636
                                                   5639    5642    5645
    5648
                                                   5652    5653    5656
    5657
            PEPROC            *(16) PROCPTR        5621D   5632    5634
    5637
                                                   5640    5643    5646
    5649
                                                   5654    5658
            PEUSERDATA        *(16)                5622D   5627
            WWUSERDATA        *(16)                5624D   5627M   5632
    5635
                                                   5638    5641    5644
    5647
                                                   5650    5655    5659
   Referencias de campo para subprocedimiento HTTP_REDIR_LOC
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            No existen referencias en el fuente.
   Referencias de campo para subprocedimiento HTTP_LONG_PARSEURL
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PEHOST            A(256)               5708D   5728M   5805M
     5814
                                                   5815    5816    5817M
     5817
                                                   5828    5829    5830
    5831M
                                                   5831    5836    5863
            PEPASSWORD        A(32)                5707D   5727M   5821M
     5857
                                                   5859
            PEPATH            A(32767)             5710D   5720    5730M
     5844M
                              VARYING(2)           5845    5845    5846M
     5869
                                                   5871    5872
            PEPORT            I(10,0)              5709D   5729M   5832M
     5864
                                                   5866
            PESERVICE         A(32)                5705D   5725M   5773M
     5775
                                                   5775M   5778    5778
    5853
            PEURL             A(32767)             5704D   5731    5739
    5743
                              VARYING(2)           5744    5747
            PEUSERNAME        A(32)                5706D   5726M   5820M
     5823M
                                                   5854    5856
            WWLASTPATH        A(32767)             5720D   5746    5872M
                              VARYING(2)
            WWLASTREL         A(32767)             5719D   5744    5746
    5853M
                              VARYING(2)           5855M   5855    5858M
     5858
                                                   5861M   5861    5863M
     5863
                                                   5865M   5865
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   167
   *RNF7031 WWLEN             I(10,0)              5712D
            WWPOS             I(10,0)              5715D   5766M   5767
    5767
                                                   5773    5774    5800M
     5801
                                                   5802M   5805    5806
    5809
                                                   5814M   5815    5815
    5816
                                                   5817    5818M   5819
    5819
                                                   5820    5821    5828M
     5829
                                                   5829    5830    5831
    5869M
                                                   5870    5871    5872
    5875M
                                                   5875
   *RNF7031 WWRCHK            A(4)                 5716D
            WWRELOK           N(1)                 5718D   5738    5878M
            WWTEMP            A(65)                5714D   5816M   5818
    5819
                                                   5820    5821    5823
    5830M
                                                   5832
            WWURL             A(32767)             5713D   5719    5731M
     5744M
                              VARYING(2)           5746M   5750    5766
    5767
                                                   5773    5774M   5774
    5789
                                                   5795M   5795    5800
    5802
                                                   5805    5806    5807M
     5809M
                                                   5809    5844
   Referencias de campo para subprocedimiento HTTP_URL_GET
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PECONTENTTYPE     A(64)                5906D   5951    5955
            PEFILENAME        A(32767)             5902D   5920
                              VARYING(2)
            PEMODTIME         Z(26)                5905D   5947    5951
    5955
            PESOAPACTION      A(64)                5907D   5956
            PETIMEOUT         I(10,0)              5903D   5939    5942
    5946
                                                   5950    5954
            PEURL             A(32767)             5901D   5935    5938
    5941
                              VARYING(2)           5945    5949    5953
            PEUSERAGENT       A(64)                5904D   5943    5947
    5951
                                                   5955
            RC                I(10,0)              5910D   5935M   5938M
     5941M
                                                   5945M   5949M   5953M
     5961
            WWFD              I(10,0)              5909D   5920M   5923
    5935
                                                   5938    5941    5945
    5949
                                                   5953    5959
   Referencias de campo para subprocedimiento HTTP_URL_POST
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PECONTENTTYPE     A(64)                5988D   6033    6038
            PEFILENAME        A(32767)             5985D   6002
                              VARYING(2)
            PEPOSTDATA        *(16)                5983D   6018    6022
    6026
                                                   6031    6036
            PEPOSTDATALEN     I(10,0)              5984D   6018    6022
    6026
                                                   6031    6036
            PESOAPACTION      A(64)                5989D   6039
            PETIMEOUT         I(10,0)              5986D   6023    6027
    6032
                                                   6037
            PEURL             A(32767)             5982D   6017    6021
    6025
                              VARYING(2)           6030    6035
            PEUSERAGENT       A(64)                5987D   6028    6033
    6038
            RC                I(10,0)              5992D   6017M   6021M
     6025M
                                                   6030M   6035M   6044
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   168
            WWFD              I(10,0)              5991D   6002M   6005
    6019
                                                   6023    6027    6032
    6037
                                                   6042
   Referencias de campo para subprocedimiento HTTP_URL_GET_RAW
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PECONTENTTYPE     A(64)                6073D   6131    6140
            PEFD              I(10,0)              6068D   6100    6105
    6111
                                                   6118    6126    6135
            PEMODTIME         Z(26)                6072D   6122    6130
    6139
            PEPROC            *(16) PROCPTR        6069D   6101    6106
    6112
                                                   6119    6127    6136
            PESOAPACTION      A(64)                6074D   6141
            PETIMEOUT         I(10,0)              6070D   6086    6107
    6113
                                                   6120    6128    6137
            PEURL             A(32767)             6067D   6083    6085
    6099
                              VARYING(2)           6104    6110    6117
    6125
                                                   6134
            PEUSERAGENT       A(64)                6071D   6114    6121
    6129
                                                   6138
            RC                I(10,0)              6077D   6098M   6103M
     6109M
                                                   6116M   6124M   6133M
     6148
            WWCOMM            *(16)                6076D   6083M   6085M
     6089
                                                   6098    6103    6109
    6116
                                                   6124    6133    6147
   Referencias de campo para subprocedimiento HTTP_URL_POST_RAW
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PECONTENTTYPE     A(64)                6178D   6247    6260
            PEFD              I(10,0)              6174D   6209    6219
    6230
                                                   6243    6256
            PEPOSTDATA        *(16)                6172D   6207    6217
    6228
                                                   6241    6254
            PEPOSTDATALEN     I(10,0)              6173D   6208    6218
    6229
                                                   6242    6255
            PEPROC            *(16) PROCPTR        6175D   6210    6220
    6231
                                                   6244    6257
            PESOAPACTION      A(64)                6179D   6261
            PETIMEOUT         I(10,0)              6176D   6191    6221
    6232
                                                   6245    6258
            PEURL             A(32767)             6171D   6188    6190
    6204
                              VARYING(2)           6214    6225    6238
    6251
            PEUSERAGENT       A(64)                6177D   6233    6246
    6259
            RC                I(10,0)              6182D   6203M   6213M
     6224M
                                                   6237M   6250M   6268
            WWCOMM            *(16)                6181D   6188M   6190M
     6194
                                                   6203    6213    6224
    6237
                                                   6250    6267
   Referencias de campo para subprocedimiento HTTP_SELECT_COMMDRIVER
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PECOMMTYPE        A(32)                6284D   6287    6290
    6296
   Referencias de campo para subprocedimiento HTTP_URL_POST_RAW2
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PECONTENTTYPE     A(64)                6334D   6402    6415
            PEDATALEN         I(10,0)              6329D   6364    6374
    6385
                                                   6397    6410
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   169
            PEPOSTFD          I(10,0)              6327D   6361    6371
    6382
                                                   6394    6407
            PEPOSTPROC        *(16) PROCPTR        6328D   6362    6372
    6383
                                                   6395    6408
            PESAVEFD          I(10,0)              6330D   6365    6375
    6386
                                                   6398    6411
            PESAVEPROC        *(16) PROCPTR        6331D   6366    6376
    6387
                                                   6399    6412
            PESOAPACTION      A(64)                6335D   6416
            PETIMEOUT         I(10,0)              6332D   6347    6377
    6388
                                                   6400    6413
            PEURL             A(32767)             6326D   6344    6346
    6360
                              VARYING(2)           6370    6381    6393
    6406
            PEUSERAGENT       A(64)                6333D   6389    6401
    6414
            RC                I(10,0)              6338D   6359M   6369M
     6380M
                                                   6392M   6405M   6423
            WWCOMM            *(16)                6337D   6344M   6346M
     6350
                                                   6359    6369    6380
    6392
                                                   6405    6422
   Referencias de campo para subprocedimiento HTTP_URL_POST_STMF
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PECONTENTTYPE     A(64)                6450D   6543    6553
            PEPOSTFILE        A(32767)             6446D   6466    6476
                              VARYING(2)
            PERECVFILE        A(32767)             6447D   6490
                              VARYING(2)
            PESOAPACTION      A(64)                6451D   6554
            PETIMEOUT         I(10,0)              6448D   6524    6532
    6541
                                                   6551
            PEURL             A(32767)             6445D   6511    6518
    6526
                              VARYING(2)           6535    6545
            PEUSERAGENT       A(64)                6449D   6533    6542
    6552
            RC                I(10,0)              6456D   6511M   6518M
     6526M
                                                   6535M   6545M   6559
            WWDATASIZE        U(10,0)              6455D   6473M   6514
    6521
                                                   6529    6538    6548
            WWPOSTFD          I(10,0)              6453D   6476M   6477
    6501
                                                   6512    6519    6527
    6536
                                                   6546    6557
            WWRECVFD          I(10,0)              6454D   6490M   6498
    6515
                                                   6522    6530    6539
    6549
                                                   6558
            WWSTAT            A(128)               6457D   6466    6472
   Referencias de campo para subprocedimiento HTTP_PERSIST_OPEN
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            P_ADDR            *(16)                6590D   6641M   6647
    6655
            PETIMEOUT         I(10,0)              6578D   6598    6599
            PEURL             A(32767)             6577D   6607
                              VARYING(2)
            WWCOMM            *(16)                6589D   6636M   6637
    6641
                                                   6654    6665    6670
    6679
                                                   6685
            WWHOST            A(256)               6584D   6608    6615
    6619M
                                                   6642
            WWORIGHOST        A(256)               6586D   6615M   6667
            WWORIGPORT        I(10,0)              6587D   6616M   6668
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   170
            WWPASS            A(32)                6583D   6608
            WWPATH            A(32767)             6588D   6608
                              VARYING(2)
            WWPORT            I(10,0)              6585D   6608    6616
    6623M
                                                   6644
            WWSERV            A(32)                6581D   6607    6627
    6636
                                                   6643    6666
            WWTIMEOUT         I(10,0)              6580D   6599M   6601M
     6656
                                                   6669    6680
            WWUSER            A(32)                6582D   6607
   Referencias de campo para subprocedimiento HTTP_PERSIST_GET
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            P_CONTENTTYPE     *(16)                6734D   6735    6778M
     6781M
            P_MODTIME         *(16)                6732D   6733    6770M
     6773M
            P_SOAPACTION      *(16)                6736D   6737    6786M
     6789M
            P_USERAGENT       *(16)                6730D   6731    6762M
     6765M
            PECOMM            *(16)                6715D   6813
            PECONTENTTYPE     A(64)                6722D   6779
            PEFD              I(10,0)              6717D   6814
            PEMODTIME         Z(26)                6721D   6771
            PEPROC            *(16) PROCPTR        6718D   6812
            PESOAPACTION      A(64)                6723D   6787
            PETIMEOUT         I(10,0)              6719D   6754    6755
            PEURL             A(32767)             6716D   6798
                              VARYING(2)
            PEUSERAGENT       A(64)                6720D   6763
            RC                I(10,0)              6744D   6812M   6832
            WWCONTENTTYPE     A(64)                6735D   6779M   6820
                              BASED(P_CONTENT+)
            WWCT              A(64)                6727D   6778
            WWHOST            A(256)               6741D   6799    6817
            WWMODTIME         Z(26)                6733D   6771M   6818
                              BASED(P_MODTIME)
            WWMT              Z(26)                6726D   6770
            WWPASS            A(32)                6740D   6799    6807
            WWPATH            A(32767)             6743D   6799    6816
                              VARYING(2)
            WWPORT            I(10,0)              6742D   6799    6822
            WWSA              A(64)                6728D   6786
            WWSECURE          N(1)                 6745D   6804M   6823
            WWSERV            A(32)                6738D   6798    6803
    6824
            WWSOAPACTION      A(64)                6737D   6787M   6821
                              BASED(P_SOAPACT+)
            WWTIMEOUT         I(10,0)              6729D   6755M   6757M
     6815
            WWUA              A(64)                6725D   6762
            WWUSER            A(32)                6739D   6798    6807
            WWUSERAGENT       A(64)                6731D   6763M   6819
                              BASED(P_USERAGE+)
   Referencias de campo para subprocedimiento HTTP_PERSIST_POST
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            P_CONTENTTYPE     *(16)                6893D   6894    6931M
     6934M
            P_SOAPACTION      *(16)                6895D   6896    6939M
     6942M
            P_USERAGENT       *(16)                6891D   6892    6923M
     6926M
            PECOMM            *(16)                6874D   6988
            PECONTENTTYPE     A(64)                6884D   6932
            PEPOSTDATA        *(16)                6878D   6906    6966
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   171
            PEPOSTDATALEN     I(10,0)              6879D   6907    6963
    6964
                                                   6965
            PEPOSTFD          I(10,0)              6876D   6997
            PEPOSTPROC        *(16) PROCPTR        6877D   6964    6977
    6996
            PESAVEFD          I(10,0)              6880D   6989
            PESAVEPROC        *(16) PROCPTR        6881D   6984
            PESOAPACTION      A(64)                6885D   6940
            PETIMEOUT         I(10,0)              6882D   6915    6916
            PEURL             A(32767)             6875D   6949
                              VARYING(2)
            PEUSERAGENT       A(64)                6883D   6924
            RC                I(10,0)              6903D   6984M   7012
            WWCONTENTTYPE     A(64)                6894D   6932M   6994
                              BASED(P_CONTENT+)
            WWCT              A(64)                6888D   6931
            WWHOST            A(256)               6900D   6950    6992
            WWPASS            A(32)                6899D   6950    6958
            WWPATH            A(32767)             6902D   6950    6991
                              VARYING(2)
            WWPORT            I(10,0)              6901D   6950    6998
            WWPOSTDATA        *(16)                6906D   6968    6981M
     6986
                                                   7008    7009
            WWPOSTLEN         I(10,0)              6907D   6963M   6965M
     6969
                                                   6987
            WWSA              A(64)                6889D   6939
            WWSECURE          N(1)                 6905D   6955M   6999
            WWSENDPROC        *(16) PROCPTR        6904D   6978M   6980M
     6985
            WWSERV            A(32)                6897D   6949    6954
    7000
            WWSOAPACTION      A(64)                6896D   6940M   6995
                              BASED(P_SOAPACT+)
            WWTIMEOUT         I(10,0)              6890D   6916M   6918M
     6990
            WWUA              A(64)                6887D   6923
            WWUSER            A(32)                6898D   6949    6958
            WWUSERAGENT       A(64)                6892D   6924M   6993
                              BASED(P_USERAGE+)
   Referencias de campo para subprocedimiento HTTP_PERSIST_CLOSE
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PECOMM            *(16)                7027D   7028
   Referencias de campo para subprocedimiento PARSE_RESP_CHAIN
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            CRLF              A(2)                 7055D   7083    7109
    7168
            LF                A(1)                 7054D   7079    7105
    7146
                                                   7149    7164
            PEAUTHERR         N(1)                 7044D   7059M   7131
            PECLEN            U(10,0)              7042D   7117M   7120
            PEHOST            A(256)               7047D   7182
                              VARYING(2)
            PEPATH            A(256)               7048D   7182
                              VARYING(2)
            PEPROXYAUTHERR    N(1)                 7046D   7062M   7153
            PERC              I(10,0)              7040D   7058    7061
    7064
                                                   7064    7064    7065
    7196
            PERESPCHAIN       A(32767)             7039D   7072    7128
    7148
                              VARYING(2)           7172    7179    7189
    7192
            PETE              A(32)                7041D   7078M   7086M
     7090
                                                   7091    7093    7104
    7119
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   172
            PEUSECL           N(1)                 7043D   7103M   7113M
            WWCHAIN           A(32767)             7050D   7072M   7073
    7073M
                              VARYING(2)           7080    7083    7086
    7106
                                                   7109    7112    7126
    7146
                                                   7149    7165    7168
            WWCL              A(32)                7053D   7102M   7112M
     7117
            WWPOS             I(10,0)              7051D   7079M   7081
    7082M
                                                   7082    7083    7084
    7086
                                                   7105M   7107    7108M
     7108
                                                   7109    7110    7112
    7126M
                                                   7127    7128    7146M
     7147
                                                   7148    7149M   7150
    7164M
                                                   7166    7167M   7167
    7168
                                                   7169    7172
            WWPOS2            I(10,0)              7052D   7083M   7084M
     7084
                                                   7085    7086    7109M
     7110M
                                                   7110    7111    7112
    7168M
                                                   7169M   7169    7170
    7172
   Referencias de campo para subprocedimiento HTTP_SET_100_TIMEOUT
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PETIMEOUT         P(10,3)              7223D   7224
   Referencias de campo para subprocedimiento HTTP_USE_COOKIES
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PESETTING         N(1)                 7241D   7242
   Referencias de campo para subprocedimiento HTTP_PROXY_SETAUTH
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PEAUTHTYPE        A(1)                 7263D   7272    7273
    7282
                                                   7310
            PEPASSWD          A(1024)              7265D   7289    7296
    7299
            PEUSERNAME        A(80)                7264D   7288    7295
    7298
            WWENCLEN          I(10,0)              7269D   7304M   7309
            WWENCODED         A(1476)              7268D   7306    7307
    7309
            WWSTRING          A(1105)              7267D   7298M   7300
    7301
                                                   7304    7305
   Referencias de campo para subprocedimiento HTTP_SETPROXY
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PEHOST            A(256)               7325D   7328
            PEPORT            I(10,0)              7326D   7329
   Referencias de campo para subprocedimiento HTTP_PROXY_GETAUTH
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PEBASIC           N(1)                 7360D   7370M
            PEREALM           A(124)               7361D   7371M
   Referencias de campo para subprocedimiento PROXY_TUNNEL
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            PECOMM            *(16)                7393D   7457    7468
            PEHOST            A(256)               7395D   7422    7429
    7434
            PEPORT            I(10,0)              7396D   7414    7427
    7435
            PESERV            A(32)                7394D   7415
            PETIMEOUT         I(10,0)              7397D   7460    7471
            RC                I(10,0)              7402D   7457M   7461
    7462
                                                   7468M   7473    7474
    7477M
                                                   7478    7486    7487
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   173
            WWAUTHERR         N(1)                 7407D   7482
            WWCLEN            U(10,0)              7405D   7480
            WWPORT            I(10,0)              7403D   7416M   7418M
     7423
            WWPROXYAUTHERR    N(1)                 7409D   7483
            WWREQ             A(32767)             7399D   7422M   7428M
     7428
                              VARYING(2)           7433M   7433    7440M
     7440
                                                   7447M   7447    7452M
     7452
                                                   7458    7459
            WWRESP            A(32767)             7400D   7469    7470
    7477
                              VARYING(2)
            WWTE              A(32)                7404D   7479
            WWUSECL           N(1)                 7406D   7481
   Referencias de campo para subprocedimiento ERRNO
            Campo             Atributos          Referencias (D=Defin.
   M=Modific.)
            P_ERRNO           *(16)                7546D   7547    7548M
            WWRETURN          I(10,0)              7547D   7549
                              BASED(P_ERRNO)
         Referencias de Indicador:
            Indicador                            Referencias (D=Defin.
   M=Modific.)
        * * *   F I N   D E   R E F E R E N C I A S   C R U Z A D A S   *
   * *
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   174
                        R e f e r e n c i a s   E x t e r n a s
         Procedimientos enlazados estáticamente:
            Procedimiento                        Referencias
            MD5                                    2079    5359    5366
    5384
            dup                                    3155
            atoi                                   2131    4763    5832
            dup2                                   3163
            link                                   3407
            open                                   3482    5922    6004
    6476
                                                   6497
            pipe                                   3531
            read                                   3604    6513
            stat                                   3677    6466
            atoll                                  2134    7117
            chdir                                  3093
            chmod                                  3101
            chown                                  3110
            close                                  3126    5959    6042
    6501
                                                   6557    6558
            creat                                  3146
            fcntl                                  3219
            fstat                                  3240
            fsync                                  3271
            ioctl                                  3383
            lseek                                  3416
            lstat                                  3440
            mkdir                                  3462
            pread                                  3542
            readv                                  3632
            rmdir                                  3669
            umask                                  3727
            utime                                  3745
            write                                  3754    3764    5936
    6019
                                                   6516
            memcpy                                 2139
            XALLOC                                 2155
            perror                                 2525
            access                                 3070
            fchdir                                 3185
            fchmod                                 3194
            fchown                                 3203
            getcwd                                 3297
            getgid                                 3320
            getuid                                 3376
            lchown                                 3397
            mkfifo                                 3472
            open64                                 3499
            pwrite                                 3570
            stat64                                 3687
            unlink                                 3737
            writev                                 3774
            sscanf                                 5124    5160
            strtok                                 5433    5480    5501
    5507
                                                   5513    5522
            __errno                                2520    7548
            accessx                                3082
            fstat64                                3249
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   175
            getegid                                3306
            geteuid                                3313
            lseek64                                3426
            lstat64                                3453
            opendir                                3513
            pread64                                3556
            readdir                                3614
            symlink                                3710
            sysconf                                3719
            SETERROR                               2087    4128    4353
    4645
                                                   4777    4779    4825
    4855
                                                   4857    4955    4976
    5080
                                                   5087    5198    5235
    5251
                                                   5663    5769    5780
    5791
                                                   5838    5925    6007
    6297
                                                   6468    6479    6500
    7094
                                                   7133    7155    7275
    7291
                                                   7366
            HTTPDATE                               2091    4251
            XDEALLOC                               2157    7009
            XREALLOC                               2159
            ICONVDYN                               2170
            strerror                               2522    5925    6007
    6468
                                                   6479    6500
            closedir                               3136
            faccessx                               3173
            getgrgid                               3327
            getgrnam                               3335
            getpwnam                               3356
            getpwuid                               3368
            pathconf                               3521
            pwrite64                               3584
            readlink                               3622
            HTTP_COMP                              1605
            HTTP_DIAG                              1614
            DEBUG_MSG                              2074    4123    4200
    4437
                                                   4709    4824    4907
    4917
                                                   4937    4943    4948
    5006
                                                   5063    5135    5163
    5195
                                                   5230    5325    5437
    5551
                                                   5723    5741    5750
    5912
                                                   5994    6460    6465
    6475
                                                   6489    6593    6748
    6909
                                                   7120    7271    7363
            UTIL_DIAG                              2084
            XML_XLATE                              2096
            NEW_ICONV                              2163
            fpathconf                              3231
            ftruncate                              3279
            getgroups                              3343
            rewinddir                              3660
            statvfs64                              3701
            HTTP_ERROR                              451    4336    4583
    4626
                                                   4726    5143
            HTTPS_INIT                              472
            HTTP_DEBUG                             1375
            HTTP_XLATE                             1444    5153    5262
    7302
            HTTP_CRASH                             1622
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   176
            HTTP_XMLNS                             1639
            URL_ENCODE                             2059
            FILE_CCSID                             2094    5922    6004
    6496
            _C_TS_free                             2152
            OS_RELEASE                             2178
            fstatvfs64                             3262
            HTTP_XLATEP                            1461    4665    4753
            HTTP_HEADER                            1565
            BASE64_INIT                            2045
            DEBUG_WRITE                            2070
            DEBUG_CLOSE                            2077    4132
            CLOSE_ICONV                            2167
            GET_SYMBOLS                            2176
            ftruncate64                            3288
            COMMTCP_NEW                            6288
            COMMSSL_NEW                            6291
            HTTPS_IDNAME                            514
            HTTPS_STRICT                            524
            _C_TS_malloc                           2146
            HEADER_PARSE                           2188    7179
            HTTP_PARSEURL                           402
            HTTPS_DCM_REG                           492
            HTTPS_CLEANUP                           503
            HTTP_XLATEDYN                          1478    6968
            HTTP_TEMPFILE                          1630
            BASE64_ENCODE                          2048    5267    7307
            DEBUG_SETPROC                          2066    5632
            _C_TS_realloc                          2149
            HTTP_GET_XMLTF                          958
            HTTP_SETCCSIDS                         1391
            HTTP_SETTABLES                         1407
            URL_ENCODE_PRE                         2054
            COMMTCP_FD_SET                         2114
            Qp0lRenameKeep                         3650
            HTTP_POST_XMLTF                        1057
            COMMTCP_FD_ZERO                        2124
            HTTP_URL_GET_XML                        919     930
            HTTP_COOKIE_FILE                       1596
            COMMTCP_FD_ISSET                       2119
            COMMSSL_SETXPROC                       2182    5655    5659
            HTTP_URL_POST_XML                      1013    1025
            HTTP_SETFILECCSID                      1430
            HTTP_XMLRETURNPTR                      1653
            HTTP_XMLSTRIPCRLF                      1669
            HTTP_XML_SETCCSIDS                     1520
            HTTP_BUILD_SOCKADDR                     425
            HTTP_PARSE_XML_STMF                    1545
            HEADER_LOAD_COOKIES                    2193    7182
            HTTP_URL_ENCODER_NEW                    666
            HTTP_POST_STMF_XMLTF                   1141
            HTTP_URL_ENCODER_FREE                   741
            HTTP_MFD_ENCODER_OPEN                  1293
            HTTP_PARSER_SWITCH_CB                  1691
            HTTP_PARSE_XML_STRING                  1742
            HTTP_URL_POST_STMF_XML                 1097    1108
            HTTP_MFD_ENCODER_CLOSE                 1362
            HTTP_PARSER_GET_END_CB                 1713
            HEADER_GET_REQ_COOKIES                 2198    4289    4528
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   177
            HTTP_URL_ENCODER_ADDVAR                 684
            HTTP_URL_ENCODER_GETPTR                 702
            HTTP_URL_ENCODER_GETSTR                 723
            HTTP_MFD_ENCODER_ADDVAR                1311
            COMMTCP_CONNECTBLOCKING                2104
            COMMTCP_CONNECTNONBLOCK                2109
            HTTP_MFD_ENCODER_ADDSTMF               1348
            HTTP_PARSER_GET_START_CB               1704
            HTTP_PARSER_GET_USERDATA               1722
            HTTP_URL_ENCODER_ADDVAR_S               757
            HTTP_MFD_ENCODER_ADDVAR_S              1329
         Campos importados:
            Campo             Atributos          Definidos
            No existen referencias en el fuente.
         Campos exportados:
            Campo             Atributos          Definidos
            No existen referencias en el fuente.
      * * * *   F I N   D E   R E F E R E N C I A S    E X T E R N A S
   * * * *
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   178
                          R e s u m e n   d e   M e n s a j e s
    ID msje Gr Número Texto de mensaje
   *RNF5409 00     19 La llamada con prototipo devuelve un valor que se
   pierde
                      cuando se utiliza CALLP.
   *RNF7031 00    264 No se hace referencia a un nombre o indicador.
   *RNF7030 30      2 No se ha definido el nombre o indicador.
   *RNF7503 30      2 La expresión contiene un operando que no se ha
   definido.
   *RNF7542 30      1 No puede pasarse el parámetro por referencia cuando
   puede
                      cambiarse durante la llamada.
          * *   F I N   D E   R E S U M E N   D E   M E N S A J E S   * *
    5761WDS V6R1M0  080215 RN        IBM ILE RPG
   LIBHTTP/HTTPAPIR4        BENDERTS   24/02/10 09:53:43        Pág.
   179
                               R e s u m e n   F i n a l
     Mensajes Totales:
       Información  (00) . . . . . . . :      283
       Aviso        (10) . . . . . . . :        0
       Error        (20) . . . . . . . :        0
       Error Grave  (30+)  . . . . . . :        5
       ---------------------------------  -------
       Total . . . . . . . . . . . . . :      288
     Totales del Fuente:
       Registros . . . . . . . . . . . :     7554
       Especificaciones  . . . . . . . :     3592
       Registros de datos  . . . . . . :        0
       Comentarios . . . . . . . . . . :     2938
            * * * * *   F I N   D E   R E S U M E N   F I N A L   * * * *
   *
   La compilación se ha detenido. Se han encontrado errores de gravedad
   30 en el programa.
             * * * * *   E N D   O F   C O M P I L A T I O N * * * * *
   MENSAJE MEDIOAMBIENTAL:  Antes de imprimir este mensaje, por favor,
   compruebe que es necesario.
   Una tonelada de papel implica la tala de 15 árboles y el consumo de
   250.000 litros de agua.
   El Medio Ambiente es cuestión de TODOS.
   __________________________________
   Amalia López Juan
   Diputación Provincial de Teruel
   Servicio de Informática
   amalia.lopez@xxxxxxxxxxx
   Tfno: 978647408

References

   1. http://www.scottklement.com/httpapi/
   2. http://www.blah.com/dir/file.txt
   3. http://www.blah.com/cgi-bin/etc
   4. http://www.blah.com/dir/file.txt
   5. http://www.blah.com/cgi-bin/etc
   6. http://www.blah.com/cgi-bin/etc
   7. http://www.blah.com/cgi-bin/etc
   8. http://www.server.com/somedir/somefile.ext
   9. https://www.server.com/somedir/somefile.ext
  10. http://user:passwd@xxxxxxxxxxxxxx/somedir/somefile.ext
  11. http://www.blah.com/dir/file.txt
  12. http://www.blah.com/cgi-bin/etc
  13. http://www.blah.com/dir/file.txt
  14. http://www.blah.com/cgi-bin/etc
  15. http://www.blah.com/cgi-bin/etc
  16. http://www.blah.com/cgi-bin/etc
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------