home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / rxiutl16.zip / readme.txt < prev    next >
Text File  |  2000-01-11  |  21KB  |  406 lines

  1. This currently two-membered collection of REXX socket utilities has been 
  2. started due to what I perceive as a lack of simple-function Internet 
  3. utilities around.
  4.  
  5. These utilities require Object REXX, and will not function with SAA REXX.  
  6. If you are running Warp v4, then execute "switchrx" from a command line to 
  7. activate Object REXX if you've not already done so.  Object REXX is 
  8. backwards compatible with SAA REXX, and offers many benefits completely 
  9. independant from object-oriented programming.  If you are running Warp v3, 
  10. you can download a copy of Object REXX for free from IBM.  The current URL 
  11. for that download is http://service.software.ibm.com/dl/rexx/orexx30-d
  12. It contains bug fixes for problems in the libraries that shipped with Warp 
  13. 4, so users of that should upgrade to the latest fixpack, which includes 
  14. the REXX update.
  15.  
  16. ================================================================================
  17.  
  18. The utilities:
  19.  
  20. URL File Fetcher
  21.  
  22. This utility has a simple function - grab a file from a remote server using
  23. either FTP or HTTP.  Just run urlget.cmd with the URL of the file to grab.
  24. The protocol used is determined by the given URL.  Read urlget.txt for more 
  25. information.
  26.  
  27. NNTP Group Lister
  28.  
  29. This utility also has a very simple function (a recurring theme) - grab a 
  30. list of news groups from a news server.  Run ngfetch.cmd with the name of a 
  31. news server as the argument.  It will fetch a list of all available news 
  32. groups.  Read ngfetch.txt for more information.
  33.  
  34. ================================================================================
  35.  
  36. Comments, questions, and problems can be directed to me, Mike Ruskai, at 
  37. thanny@home.com.
  38.  
  39. ================================================================================
  40.  
  41. History:
  42.  
  43. 02-27-98  First iteration of this package, including httpget and 
  44.           ngfetch.
  45.  
  46. 02-28-98  Fixed stupid bug in ngfetch.cmd that lost groups sporadically, 
  47.           and wrote article number information instead.
  48.  
  49. 03-03-98  Modified ngfetch to display number of groups received in 
  50.           status, and fixed screen display methods to work with the new 
  51.           version of Object REXX recently downloaded.  We'll call this 
  52.           v0.03
  53.  
  54. 03-13-98  Modified httpget.cmd to display total file size (if available) 
  55.           and percentage completion.  While testing this, discovered a 
  56.           problem with files on the root directory that I created while 
  57.           spiffing it up to allow multiple URL's.  
  58.             
  59.           I also came across bad behavior on the part of Microsoft IIS 3.0.  
  60.           I was issuing a simple GET message via HTTP 1.0, and IIS was 
  61.           replying with a 406 error, stating that there was no suitable 
  62.           reply type.  406 is not a valid return code in HTTP 1.0!  It's 
  63.           only valid in HTTP 1.1!  With HTTP 1.1, if the client doesn't send 
  64.           a header with the acceptable transfer encoding specified, the 
  65.           specs say that the server "MAY" assume any type.  Well, IIS was 
  66.           violating those specs by assuming *ONE* type, specifically 
  67.           text/html.  I've worked around this bug, which I hope is only in 
  68.           IIS, by putting in 'Accept:' and 'Accept-Encoding:' header items.  
  69.           I've also put in a catch for 406 (even though no web server 
  70.           should be returning it to a HTTP 1.0 request), which will only 
  71.           happen with some really screwy web server that doesn't properly 
  72.           acknowledge the headers.  If you see this happening, please 
  73.           uncomment the lines marked by the 406 comments, and send the 
  74.           resulting file to thanny@home.com, so I can see who the culprit 
  75.           server is.  
  76.  
  77.           I also reworked the break handling, since it was ignoring the
  78.           HALT status while in an object method.  Should be able to press
  79.           CTRL-C/BRK at any time without orphaning a socket now :)
  80.  
  81.           We'll call this one v0.04.  Working on digesting FTP specs...
  82.  
  83. 04-07-98  Just a quick fix to remove boneheadedness on my part.  I 
  84.           neglected to include the comma deliminator procedure in ngfetch,
  85.           so it doesn't work for anyone who doesn't have such a procedure
  86.           somewhere in the path (i.e. everyone but me).  Not worthy of it,
  87.           but this is v0.05, just to have a number.
  88.  
  89. 04-26-98  Added quiet mode to httpget and ngfetch, to suppress both the
  90.           calculations and display of transfer status.  
  91.         
  92.           Added stats line upon the end of transfer that prints 
  93.           out in quiet and non-quiet mode as final confirmation (and only 
  94.           confirmation in quiet mode).
  95.  
  96.           Added excessive error handling to httpget, since it's getting
  97.           bulky, and I don't want to strand sockets on people's computers
  98.           if it crashes for any reason not found during testing.  
  99.  
  100.           Altered usage display of httpget and ngfetch to be more 
  101.           clear for those not familiar with commandline argument standards, 
  102.           though you still need to know that <> denotes mandatory, [] 
  103.           denotes optional, and | means "or".  
  104.  
  105.           Fixed a very obscure "bug" that probably never happened to 
  106.           anyone.  It's only by chance that I found it at all.  It could
  107.           only happen with a *fast* connection.  What could happen is that
  108.           the transfer of the first 10240 bytes would happen so quickly 
  109.           that the REXX timer (which has a 0.01 second granularity) would
  110.           give an elapsed time of 0 seconds, resulting in a divide-by-zero
  111.           error when calculating the transfer rate.  Just made any zero
  112.           times 0.01.
  113.  
  114.           Added User-Agent: tag to the header, specifying HTTPGet and
  115.           Object REXX with their respective versions.
  116.  
  117.           Reformated history to be more readable (so I cheated).
  118.  
  119.           Call this version 0.06.  
  120.  
  121. 05-31-98  Added version checking to prevent the programming from looking
  122.           really nasty as it crashed with SAA REXX.  Don't know why this
  123.           wasn't done in the first place.  After receiving a few e-mails
  124.           about it, though, I've been straightened out <g>.  
  125.  
  126. 08-07-98  Modified the display behavior of httpget to not show all the 
  127.           transfer status junk if the remote file doesn't exist.
  128.  
  129.           Will only display local storage name if it differs from the 
  130.           remote filename (which includes saving to a different directory
  131.           locally).
  132.  
  133.           No more messages about socket handling; no longer says "Done!",
  134.           which is obvious by that point.
  135.  
  136.           Modified the transfer rate calculation to reflect the "current"
  137.           rate, rather than the overall rate so far.  What's actually
  138.           calculated is the rate of the last four packets received.  Will
  139.           not be very accurate for wildly erratic transfer rates.
  140.  
  141.           Tokenization pushes the EA size for this sucker to about 62KB, 
  142.           pushing the limit.
  143.  
  144.           0.07 shall be the name of this creature.  Still working (slowly)
  145.           on FTP specs.
  146.  
  147. 08-12-98  Suddenly decided to implement FTP, and after a couple of hours of
  148.           imagining just how to kill the writers of RFC959, httpget has gone
  149.           the way of the dodo.  Replacing it is urlget, which will fetch
  150.           files via either HTTP or FTP, as always by URL.  In the process,
  151.           found some dormant bugs and fixed them.
  152.  
  153.           What's *actually* calculated for transfer rate is the last four
  154.           measured intervals.  For faster connections, that will entail
  155.           many more than four packets (between me and my server, it's
  156.           about 1200 packets).
  157.  
  158.           Tokenization is history.  The spiffy new urlget is more than
  159.           twice the size of httpget, running headfirst into the EA size
  160.           barrier.
  161.  
  162.           Added a bit of code to gracefully fail if the programs cannot
  163.           load the REXX Sockets functions.
  164.  
  165.           Updated and better implemented the error levels of ngfetch.cmd.
  166.  
  167.           Added errorlevels to urlget.cmd.
  168.  
  169.           This will be version 0.08, with no big ideas for other utilities
  170.           left.  Will work on logging for next release, and tuning urlget
  171.           up a bit.
  172.  
  173. 08-13-98  Knocked off about 13KB worth of code from urlget.  I dislike a
  174.           string of repetitive commands that are only slightly different, 
  175.           so I made an arcane FTP command class, and looped through the
  176.           server login and configuration procedure, with catches for the
  177.           extra work that some commands required.  In the process, I 
  178.           learned that either ::routine provides no way of exposing 
  179.           main body variables, or the way to do it is undocumented.  This
  180.           necessitated the passing of some variables that should be global.
  181.  
  182.           Tweaked a couple other things, to (hopefully) properly handle
  183.           cases where either the filename or directory contain spaces.
  184.  
  185.           Fixed the handling of spaces in either the filename or path.
  186.  
  187.           This will be version 0.09.
  188.  
  189. 09-18-98  Made a kludge to work around a bug in NCSA HTTPd version 1.5, 
  190.           where response headers were followed by LF characters, instead
  191.           of the CRLF pairs required by HTTP 1.0 (or 1.1, for that matter).
  192.           
  193.           Fixed a problem with unexpected failures of the STAT command, 
  194.           which some inferior FTP servers actually don't support.  Also
  195.           modified the parsing to work with a non-standard reply of STAT
  196.           by a server I found.
  197.  
  198.           After learning that some FTP servers will deny passive mode for
  199.           (dubious) security reasons, added the ability to transfer
  200.           normally, with the server initiating the data connection.  To
  201.           make this work properly, added a firewall flag to the program,
  202.           which is part of the new config file (with all of two entries).
  203.           If a server refuses passive mode, and the machine is configured
  204.           as behind a firewall, then the transfer will fail (can't be 
  205.           done).  Otherwise, a new socket is created, bound to, and 
  206.           listened on before sending the file request.  I was shocked that
  207.           it worked the first time I tested it <g>.  Note:  If your 
  208.           firewall uses IP masquerading (or something like it), it may be 
  209.           possible for FTP transfers to work without passive mode.  It 
  210.           depends on whether the IP masquerader is smart enough to know 
  211.           that FTP servers initiate data connections from the port number 
  212.           immediately preceding the control connection port.  I don't know 
  213.           one way or another.  If that's the case, then make the firewall
  214.           setting in the config file 0.
  215.  
  216.           Wanted to do logging, but have been spending my free time with 
  217.           C++ making a trivial program called the WarpAMP Playlist Editor.
  218.           Will do logging for next release, unless I discover bugs to be
  219.           quickly fixed.
  220.  
  221.           This is version 0.10.
  222.  
  223. 10-01-98  Worked around the same bug as above for NCSA 1.5.1.
  224.  
  225.           Worked around flaky FTP servers (such as Serv-U 2.3b for Windows)
  226.           reacting to a STAT command with parameters as if it were a STAT 
  227.           command with no parameters.  That is, it was returning a success
  228.           code of 211 when it should properly have issued a failure code, 
  229.           since it did not process the command as requested.  
  230.  
  231. 11-29-98  Rewrote the FTP handling completely.  Removed the arcane command 
  232.           class to allow for more flexibility.  As a result, the bulk of 
  233.           the program has increased, but it doesn't matter much, because
  234.           it won't tokenize either way without using rexxc.exe to create
  235.           a tokenized "executable".
  236.  
  237.           Added FTP status messages, so that if nothing's happening, one
  238.           can at least see where the hangup is.
  239.  
  240.           Added resume capability for FTP receives.
  241.  
  242.           Added logging.  Put "logging=1" in the config file to enable it.
  243.  
  244.           Reworked the command line parsing.  It worked fine, but didn't 
  245.           allow parameters very easily.  Now it does.
  246.  
  247.           Added command line switches:
  248.  
  249.             /l  - explicitly enable logging, regardless of config setting.
  250.             /r  - attempt to resume FTP transfer if the local filename.
  251.                   exists and is smaller than the server copy.
  252.             /f  - same as /r, but will abort the transfer if the FTP server
  253.                   doesn't support resume, or the file size on the server
  254.                   can't be determined.
  255.             /p  - attempt transfer when passive mode denied, and behind a
  256.                   firewall - probably won't work, but what the heck.
  257.             /d# - set the delay between attempting to send and receive data
  258.                   during FTP processing - some servers seemed to break when
  259.                   requests were made too quickly.  Default delay is 0.10 
  260.                   seconds, maximum allowed setting is 60 seconds.
  261.             /b# - set the transfer block size.  Generally speaking, larger
  262.                   blocksizes make for quicker transfers, to a point.  Valid
  263.                   values are from 512 bytes to 65535 bytes.  The default is
  264.                   10240 bytes.
  265.             /m# - set the maximum number of retries for failed socket
  266.                   transfers.  The default is 1000, and the maximum is 
  267.                   999999999.  This can be increased for patient people.
  268.  
  269. 01-11-99  Somewhere along the way, fixed a few argument parsing problems,
  270.           and perhaps some other small problems.
  271.  
  272.           Seems problem-free enough to release as version 0.12.
  273.  
  274. 01-23-99  Changed ngfetch.cmd to use the same rate calculations as 
  275.           urlget.cmd, so that the number would be based on the current 
  276.           rate, rather than the average rate.  Also fixed it to close the
  277.           socket after it's done, which was removed at some unknown point
  278.           in the past, for some unknown reason.  Also changed it so that 
  279.           any existing .newsrc file is not overwritten until the server
  280.           looks as if it will cooperate, and send the data.
  281.  
  282.           Changed the configuration file of urlget.cmd to be an INI 
  283.           profile, instead of a text-file.  This makes it easier to deal 
  284.           with programmatically.  If it gets more complicated than three
  285.           variables, I'll put in the ability to change them at will, one at 
  286.           a time.  As it is, if you want to change something, you'll need 
  287.           to delete the INI file and answer three questions, short of some
  288.           hex editing, or your own programmatic solution.
  289.  
  290.           This will be version 0.13.
  291.  
  292. 03-11-99  Changed the time display to only show hundredths of second.  
  293.           After all, that's the resolution of the REXX timer.
  294.  
  295.           Changed the comma delimination to work with fractional numbers, 
  296.           in case the transfer time breaks 1000 seconds (or should I say
  297.           1,000 seconds?).
  298.  
  299.           Added /N option to avoid overwriting local files.  So, if the 
  300.           filename exists, the transfer is aborted.  If FTP resume is
  301.           enabled, the file will be appended to if it's smaller than the
  302.           server copy, and the server supports resume.  If the file isn't
  303.           smaller, can't have its size determined, or the server doesn't
  304.           support resume, the transfer is aborted, just as with the /F 
  305.           option.
  306.  
  307.           Put the status display on a separate thread, which will update at 
  308.           a constant frequency regardless of whether or not data is coming 
  309.           in from the socket.  As a result, the current transfer rate will
  310.           be about as accurate as possible, and there will be no more long
  311.           delays between updates with erratic speeds.
  312.  
  313.           Changed the newsgroup listing file to 'newsrc', instead of
  314.           '.newsrc', since the latter won't work on FAT drives.
  315.  
  316.           Fixed a small error in ngfetch that counted one group too many,
  317.           writing the terminating period.
  318.  
  319.           Changed all .environment objects to .local objects, because the
  320.           former is shared across REXX processes, and we don't want to 
  321.           screw up other REXX programs (including other instances of 
  322.           urlget or ngfetch).
  323.  
  324.           This is version 0.14.
  325.  
  326. 04-27-99  Somewhere along the line added the /W option to temporarily act 
  327.           as if behind a firewall, using passive mode for FTP transfers.  
  328.           If you find that the transfer doesn't commence after sending the 
  329.           data port, try using this switch.  There are times when you have 
  330.           a path to the remote server, but it doesn't have a path to you, 
  331.           so can't make the data connection.
  332.  
  333.           I may have fixed other small bugs.  Don't know.  
  334.  
  335.           This is version 0.15, and the last conventional version of 
  336.           urlget.cmd.  The next will perform up to eight transfers at a 
  337.           time, use the same FTP connection for transfers on the same host 
  338.           with the same user identity, and other good stuff.
  339.  
  340. 01-10-00  OK, I lied.  I've been sidetracked by other projects, so the
  341.           multiple transfer version of urlget hasn't been getting much
  342.           attention.  I have periodically made small changes and
  343.           enhancements to the conventional urlget, as I discovered
  344.           problems, or thought of new features that I desired.  This update
  345.           contains everything I've done to urlget.cmd over the past 8
  346.           months or so.
  347.  
  348.           New features in urlget that I can remember:
  349.  
  350.               Local files aren't overwritten by default, if they exist and
  351.               are the same size as the copy on the server.  Use the /c
  352.               option to override this behavior, and overwrite regardless.
  353.  
  354.               The /qq option will suppress all program standard output.
  355.               This can be useful if you're calling urlget from a script,
  356.               and don't want your script's display messed up.  Logging
  357.               is still performed, if enabled.
  358.  
  359.               URL list files can have comment lines.  A comment is any line
  360.               that begins with '//', '/*', ';', or '#'.
  361.  
  362.               With URL lists, FTP transfers are more intelligent.  If the
  363.               current server, port, and user ID are the same as those of
  364.               the previous transfer, the same control connection is used.
  365.               This saves the time of connecting and logging in when it
  366.               isn't necessary.
  367.  
  368.               Eliminated the need to check for buggy NCSA HTTP servers (and
  369.               a whole lot of them are buggy), by looking for dual CRLF and
  370.               LF pairs, to indicate the ending of the header.
  371.  
  372.           New features in urlget that I can remember:
  373.  
  374.               Added options to control block size, status timing interval,
  375.               and maximum retries.
  376.  
  377.               Added a randomized quicksort implementation, to sort the
  378.               newsgroups after retrieval.  Since REXX is interpreted, this
  379.               is somewhat slow.  It also requires that received groups be
  380.               stored in memory.  With raw writes enabled, this will
  381.               typically take up 1.5MB or so of RAM.  Without raw writes,
  382.               it'll generally be less than half a megabyte.  This varies by
  383.               the number of newsgroups, of course.
  384.  
  385.           New features in both:
  386.  
  387.               Made a few modifications to make it work in Object REXX for
  388.               Windows 95.  Win95 will be automatically detected, and
  389.               options affected accordingly.  The only two differences in
  390.               program behavior are that the code for adding a .LONGNAME
  391.               extended attribute on FAT drives is skipped, and all calls to
  392.               SysSleep() use whole second granularity (a limitation in the
  393.               Win95 version of REXXUTIL).  The latter affects the status
  394.               timing interval, and FTP command delay.  Command line options
  395.               are processed accordingly (i.e. specifying anything other
  396.               than whole seconds when running Win95 isn't allowed).
  397.  
  398.           There are probably other additions and bug fixes that I don't
  399.           recall offhand.
  400.  
  401.           This is version 0.16, and I still intend to work on the multiple
  402.           transfer version.  Ultimately, it will do everything that WGET
  403.           does, and more.  In the meantime, I might still make adjustments
  404.           to the current urlget.cmd, and release them (#1 on my current
  405.           list is to handle HTTP redirections).
  406.