@database "HTTPResume.guide" @author Andrija Antonijevic @remark $VER: HTTPResume.guide 1.2 (22.6.98) @smartwrap @node MAIN "Welcome to HTTPResume" @{JCENTER}HTTPResume 1.2 @{JCENTER}Copyright © 1998 Andrija Antonijevic @{JLEFT} @{" Legal stuff " link Disclaimer} Lawyers enjoy reading this... @{" Introduction " link Introduction} What is this thing anyway? @{" Features " link Features} What can it do? @{" Requirements " link Requirements} What do I need to use this? @{" Giftware " link Giftware} No comment... @{" Installation " link Installation} How to install... @{" Usage " link Usage} Please read this @{" Bugs " link Bugs} Just call the exterminators ;> @{" Credits " link Credits} Credit where credit's due @{" History " link History} And on the first day... @{" Author " link Author} No comment... @endnode @node USAGE "Usage" HTTPResume can be @{" started from CLI " link CLI} or @{" from Workbench " link WB}. Its GUI is pretty simple. String gadgets URL, File, Proxy, Range and GMT[Offset] should contain neccessary data. "<" button gadget next to URL string gadget copies text from clipboard to URL. There's a getfile gadget which calls ASL file requester in which you can set output file name. In v1.2 checkbox gadget was added next to proxy string gadget to make it possible to temporarily enable/disable proxy. You can also set @{i}Overwrite@{ui} and @{i}No cache@{ui} options using appropriate checkbox gadgets. When you enter filename and URL field is empty, HTTPResume will check if file has comment which starts with valid protocol and if it does it will copy that comment to the URL field. If URL field is not empty and you still want this to happen, you will have to manually empty it. Also, if you have only directory name in the outfile field (set, for example using @{b}STARTDIR@{ub} tooltype/argument) HTTPResume will try to figure out the name of the file from URL (if there is one). This "smart" behaviour is used if you start HTTPResume from CLI and if you start it from WB. If you start it from WB, HTTPResume will only behave this way if you press Return or [SHIFT-]TAB to confirm your input. If you start it from CLI and only supply URL, there also has to be @{b}STARTDIR@{ub} argument. When you've set everything, you can click on @{i}Start@{ui}. When you click on @{i}Start@{ui}, HTTPResume will check validity of the arguments supplied and (if everything is OK) see if it needs to find out the size of file. If the file exists and @{b}OVERWRITE@{ub} is not set HTTPResume will try to find the file date and if it does it will ask server to send rest of the file only if it hasn't been modified since you downloaded the first part. You can change this behaviour by setting the icon tooltype @{b}NODATECHECK@{ub} (if started from WB) or by specifying @{b}NODATECHECK@{ub} in command line (if started from CLI). When this is done, HTTPResume will try to connect to the host/proxy and get the requested URL. If an error occurs, HTTPResume will (depending on the value of @{b}AUTORESUME@{ub}) either fail or try again (waiting specified number of seconds between retries) until maximum number of retries is reached. During the download you should be able to see transfer progress. When the download is finished, the Range field will be cleared even if an error occured because otherwise it can cause file to be downloaded improperly. A tip for usage with AWeb. You can add something like following line into links pop-up menu. SYSTEM Path:HTTPResume %u `C:RequestFile DRAWER=Work:T PUBSCREEN=AWEB` PROXY=http://proxy.rcub.bg.ac.yu:8080 PUBSCREEN=AWEB GUI Of course, change DRAWER to the one you keep you downloads in and PROXY to your proxy. RequestFile is standard command that comes with WB3.0+ This line will download URL to file you select. Here's an alternative entry: SYSTEM Path:HTTPResume %u SD=Work:T PROXY=http://proxy.rcub.bg.ac.yu:8080 PUBSCREEN=AWEB GUI This one uses "smart" feature of HTTPResume. It will download the file to Work:T and find out name of the file from URL. Experiment with this before you start using it for "real" downloads. Final words: Please keep in mind that this program is primarily ment to be used for resuming downloads, and not for complete downloads. It can be used as HTTPGet, but only when @{b}OVERWRITE@{ub} is used. Many of you might want MUI interface. Please, do @{b}not@{ub} ask me for that since I am one of those who are not very fond of it. I have spent some time on making GUI resizable and since this is very small program, I don't think GUI needs to be better. @endnode @node AUTHOR "Author" My address: @{b}E-mail:@{ub} Andrija Antonijevic @{b}Home page:@{ub} http://www.bigfoot.com/~TheAntony or http://www.rcub.bg.ac.yu/~antony It's the same page, if one doesn't work, try the other one. @{b}Snail-mail:@{ub} Andrija Antonijevic Bulevar Vuka Karadzica 5/5 32000 Cacak Serbia, Yugoslavia @endnode @node HISTORY "History" @{" " link } 1.2 (14.6.98) This version was supposed to be a minor update, but it got out of my hands ;) I would like to thank all the people who voted HTTPResume 12th and a week later even 8th best program on Aminet. Thank you :) @{" " link } Completely localized thanks to ATO. Debug file is not localized because of obvious reasons :) @{" " link } Completely rewrote URL parsing routines. HTTPResume should be able to cope with any valid URL. @{" " link } Added URL and proxy authorization. However, I did not have a chance to test proxy authorization so I would be very grateful if someone would tell me if it works. @{" " link } HTTPResume now supports redirection (files that have been moved permanently/temporarily) @{" " link } HTTPResume will now check if it should not write its current status because it might pause download for a while (f. eg. if you are moving windows, icons etc... around). This will speed up download in these cases, but it will cause messages that would otherwise be displayed to be lost. They will still be in debug file, if it's enabled, though (Mark Knibbs) @{" " link } Added iconification (Ljubomir Jankovic). I have also added possibility to have user-selectable position and width of iconify window and also option to start HTTPResume iconified @{" " link } Added FONTNAME and FONTSIZE arguments/tooltypes (Original suggestion to use Screen Text font by Luca "Hexaä" Longone) @{" " link } When not downloading file trough proxy, HTTPResume would write only its path and not full URL to file's comment. Fixed (Daniel Schmitt and Mark Knibbs) @{" " link } Added gadget to enable/disable usage of proxy (Mark Knibbs) @{" " link } Added QUICKQUIT tooltype (Ljubomir Jankovic) @{" " link } Changed the way that GUI was resized. It's a bit smarter now :) (Mark Knibbs) @{" " link } Fixed a bug which would display requester with a message even if HTTPResume was started from CLI (Mark Knibbs) @{" " link } 1.1 (21.4.98) @{" " link } Improved GUI interactivity. It will now respond instantly even if the download is taking place. As very nice side-effect, it is now possible to instantly abort downloads @{" " link } Fixed a bug which would sometimes cause bad range to be downloaded (Renne Nissinen) @{" " link } GUI option added @{" " link } Added AUTORESUME option (Mark Knibbs) @{" " link } Switched to ASL file requesters as planed for version 1.0 (Mark Knibbs) @{" " link } Added debug to file option (Mark Knibbs) @{" " link } Added possibility to disable date checking (Mark Knibbs) @{" " link } Added User-Agent: field @{" " link } BUGFIX: When Return or TAB wasn't pressed after the input in string gadgets was made, HTTPResume wouldn't accept changed values (Renne Nissinen) @{" " link } Improved progress indicator. It will now also show the percentage and file size on disk, not just of the file part which is being downloaded (Daniel Schmitt) @{" " link } HTTPResume will now write URL to file comment if there hasn't been one already (Daniel Schmitt) @{" " link } HTTPResume will try to be smart and figure out missing arguments (Daniel Schmitt) @{" " link } Added WINX and WINY arguments/tooltypes @{" " link } Added STARTDIR argument to CLI, too (Ljubomir Jankovic) @{" " link } 1.0 (2.4.98) @{" " link } Initial version (you don't say :)) @{" " link } Works ;) @endnode @node CREDITS "Credits" This program is partially based on HTTPGet by Steven Dick . It also @{b}partially@{ub} uses @{i}GadToolsBox@{ui} by @{b}Jan van den Baard@{ub} (I have added GUI resizability) I would like to thank following people for suggestions/bug reports (in alphabetical order): @{b}Ljubomir Jankovic@{ub}, @{b}Mark Knibbs@{ub}, @{b}Renne Nissinen@{ub}, @{b}Daniel Schmitt@{ub} and @{b}Marco De Vitis@{ub}. This software was translated with the help of ATO, the Amiga Translators' Organization. ATO is a non-profit organization that translates for the Amiga community! English: Andrija Antonijevic Amiga Translators' Organization: http://ato.vapor.com/ato/ mail: ato-info@ato.vapor.com @endnode @node GIFTWARE "Giftware" HTTPResume is @{i}giftware@{ui}. If you like it and use it you should send @{" me " link Author} a gift. I'll leave this to your imagination... If you can not afford to send me a gift, at least pay a visit to @{" my homepage " link Author} and sign my guestbook and say what you @{b}really@{ub} think about this program. @endnode @node REQUIREMENTS "Requirements" @{" " link } Required: @{" " link } AmigaOS 2.0+ @{" " link } asl.library @{" " link } A TCP/IP stack such as AmiTCP or compatible @endnode @node FEATURES "Features" @{" " link } Gives you the ability to continue interrupted downloads @{" " link } Can automaticaly resume download when an error occurs @{" " link } Can be used from CLI or from WB @{" " link } It has font adaptable non-MUI GUI? O:} @endnode @node INTRODUCTION "Introduction" I just saw this thing on the 'net and I would like to download it! It's 6+ MB? No problem! [After a while] Almost done... Few kilobytes to go... Aaaaaaaahhhhhhh! It can do that to me!!! I'm sure you've been in this situation at least once. It's nice when you discover that you have to download the whole thing again just because few kBs are missing... Of course, you might be lucky to find the same thing on FTP site and continue downloading from the point it was interrupted, but it's not always like that. This program will let you continue interrupted downloads, but only from servers which support this i.e. servers that use HTTP 1.1 protocol. There are more and more servers of this type every day, so it should be easy to find them... I hope O:) (wuarchive.wustl.edu is one of those servers) Anyway, this program is intended to be just a temporary solution before all Amiga browsers become capable of supporting this feature. Note that program is called @{b}HTTP@{ub}Resume. You can @{b}not@{ub} use it to continue interrupted FTP downloads nor any other kind except HTTP. HTTPResume will act as HTTPGet in cases when you give it XYZ protocol and even will let you this only when using proxy. @endnode @node DISCLAIMER "Disclaimer" @{JCENTER}HTTPResume @{JCENTER}Copyright © 1998 Andrija Antonijevic, All Rights Reserved. @{JLEFT} THIS SOFTWARE PACKAGE IS PROVIDED "AS IS" @{b}WITHOUT WARRANTY OF ANY KIND@{ub}, EITHER EXPRESS OR IMPLIED. THE ENTIRE RISK AS TO THE USE OF THIS SOFTWARE PACKAGE IS ASSUMED BY THE USER. IN NO EVENT WILL THE AUTHOR BE LIABLE FOR ANY DAMAGES, DIRECT, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL, RESULTING FROM USE, MISUSE OR INABILITY TO USE THIS SOFTWARE PACKAGE EVEN IF IT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. The author reserves the right not to develop any future versions of this software package. The author will give his best to solve any problem, if any are discovered, but is in no way required, or bound to do this. This archive can be freely distributed provided its structure is preserved. Aminet is explicitly allowed to distribute this archive on its CDs. Magazines have my permission to distribute this program on their cover disks and CDs, but I would appreciate if a copy of the magazine would be sent to me in that case. @endnode @node INSTALLATION "Installation" It's so simple that I didn't include an installation script O;) Copy @{b}HTTPResume@{ub} (and @{b}HTTPResume.info@{ub}) to any directory which is in your path, optionally HTTPResume.guide somewhere and you're ready to go. If there's a catalog for your language, you can copy it to LOCALE:Catalogs/YourLanguageName. @endnode @node CLI "CLI" When started from CLI the template is: URL,OUTFILE=OF,PROXY,RANGE,OVERWRITE/S/K,NOCACHE/S/K, GMTOFFSET=GMT/N,NODATECHECK=NODATE/S/K,AUTORESUME=AUTO/S/K, ATTEMPTS/N,DELAY/N,STARTDIR=SD,PUBSCREEN=PS,GUI/S/K,WINX/N, WINY/N,ICOX/N,ICOY/N,ICOWIDTH/N,STARTICONIFIED=STARTICO/S/K, FONTNAME=FNAME,FONTSIZE=FSIZE,NOPROXY/S/K,QUIET/S/K,DEBUG Very important! HTTPResume opens @{b}OUTFILE@{ub} in "append" mode unless @{b}OVERWRITE@{ub} is specified. Keep this in mind! @{b}URL@{ub} is (logically) the URL you want to download/continue downloading. If you don't set proxy, it has to start with @{b}http://@{ub}! Starting with v1.2, you can specify username and password in URL. @{b}OUTFILE@{ub} (or @{b}OF@{ub}) is the file you want to download/continue downloading to. @{b}PROXY@{ub} is proxy in format http://user:password@address.of.proxy:port. (User and password are not neccessary if your proxy doesn't require them) For example, http://proxy.matf.bg.ac.yu:8080. @{b}RANGE@{ub} is range you want to get. Some examples: 0-99 gets first 100 bytes -799 gets first 800 bytes 100- gets everything but first 100 bytes (0-99). If you don't set @{b}RANGE@{ub} (nor @{b}OVERWRITE@{ub}) HTTPResume will try to be smart and figure out what range it should get. For example, if you've set @{b}OUTFILE@{ub} to RAM:Testfile and RAM:Testfile already exists and it's size is 1234 bytes, HTTPResume will ask for range 1234- (because "0-1233"=1234 bytes are already there!). @{b}OVERWRITE@{ub} tells HTTPResume not to look at the size of (possibly) existing @{b}OUTFILE@{ub} and to overwrite @{b}OUTFILE@{ub} in case it exists (i.e. open the file in "write" mode). @{b}NOCACHE@{ub} speaks for itself. I don't think it makes much sense when resuming download. @{b}GMTOFFSET@{ub}: When resuming download with range not explicitly set by you, HTTPResume will only resume if file you are downloading is unmodified since . Because of that, HTTPResume needs to know this value. It's number of @{b}minutes@{ub} that need to be @{b}added@{ub} to @{b}your local time@{ub} to get GMT. This is a bit unusual, but that's the way this value is stored in struct Locale on Amiga. Anyway, you don't need to set this value if you have locale set up correctly on your system since HTTPResume will find this value for you. For example, Yugoslavia is GMT +1, so @{b}GMTOFFSET@{ub} is -60 (note the change of sign). @{b}NODATECHECK@{ub} (or @{b}NODATE@{ub}) will tell HTTPResume not to send If-Unmodified-Since field when it sends HTTP request. This can be useful if you know that the file is same, but the date stamp isn't. @{b}AUTORESUME@{ub} (or @{b}AUTO@{ub}): If the download is interrupted for some reason (unless you abort it) HTTPResume will try to continue it again automaticaly. @{b}ATTEMPTS@{ub} Number of attempts to resume download. Makes sense only if used with @{b}AUTORESUME@{ub}. Default is 5 attempts. @{b}DELAY@{ub} Seconds to wait between two retries. Makes sense only if used with @{b}AUTORESUME@{ub}. Default is 10 seconds. @{b}STARTDIR@{ub} (or @{b}SD@{ub}) is name of directory in which ASL file requester will open (WB) or name of the directory to which the @{b}OUTFILE@{ub} will be appended to make final @{b}OUTFILE@{ub} (CLI). If (in the latter case) @{b}OUTFILE@{ub} is full path, its contents will not be appended to @{b}STARTDIR@{ub}, it will remain unchanged. @{b}PUBSCREEN@{ub} is name of public screen for HTTPResume to open it's window on. If invalid name is entered, the window will be opened on default public screen. (When started from CLI, only makes sense when used with @{b}GUI@{ub} option) @{b}GUI@{ub} Will tell HTTPResume to act as if it was started from WB. Tooltypes will @{b}not@{ub} be examined! @{b}WINX@{ub} and @{b}WINY@{ub} X and Y coordinates of HTTPResume's window. (When started from CLI, only makes sense when used with @{b}GUI@{ub} option) @{b}ICOX@{ub}, @{b}ICOY@{ub} and @{b}ICOWIDTH@{ub} are X and Y coordinates and width of HTTPResume's window when it's "iconified". (When started from CLI, only makes sense when used with @{b}GUI@{ub} option). On systems with intuition.library v39+, 65535 for @{b}ICOX@{ub} and @{b}ICOY@{ub} means current window position. You can "iconify" HTTPResume by clicking on zoom gadget on its window. Be very careful: if you change size of HTTPResume's window just to its title bar, you won't be able to change its size again! Keyboard shortcuts will still work, though. @{b}STARTICONIFIED@{ub} is self-explenatory. @{b}FONTNAME@{ub} and @{b}FONTSIZE@{ub} are rather obvious. If specified font size is too big to fit on screen, HTTPResume will fall back to system default font or even to topaz 8 from ROM. @{b}NOPROXY@{ub} will tell HTTPResume to ignore proxy if it's specified. There's not much point in using it as default tooltype (you can simply leave PROXY tooltype empty). It's here just becouse of consistency. @{b}QUIET@{ub} will make HTTPResume show only error messages. @{b}DEBUG@{ub} File to output HTTPResume debuging information among which are headers that server returns. If you have a bug report, please include this file in it! You can set this to anything you like. For example, if you want to see what's happening, you might want to set DEBUG=CON://///CLOSE/WAIT (you might want to add some more options, like X and Y coords, width and height and name of the public screen for CON: to open on). @endnode @node WB "WB" When started from Workbench, HTTPResume will examine tooltypes of its icon. Possible tooltypes are STARTDIR, PROXY, OVERWRITE, NOCACHE, GMTOFFSET, NODATECHECK, AUTORESUME, ATTEMPTS, DELAY, PUBSCREEN, WINX, WINY, ICOX, ICOY, ICOWIDTH, STARTICONIFIED, FONTNAME, FONTSIZE, NOPROXY, QUIET, QUICKQUIT and DEBUG. Almost all tooltypes have the same meaning as @{" CLI arguments " link CLI} with the same name. QUICKQUIT will not ask you if you want to quit, it will just do it. @endnode @node BUGS "Bugs" If you have a bug report, please check: @{" " link } Have you read the documentation? ;> @{" " link } Have you set up proxy correctly? (Especially the port part!) @{" " link } If the stars say that today is not your day ;) If you did all this, then please send @{" me " link Author} bug report. Please send me output of the DEBUG file as it will be very helpful! @endnode