URLegal Version 1.5 Help Index

Welcome to URLegal, the 32-bit Windows application to test HTTP links in HTML documents. Think you’ve gotten some broken links? Well, offer up your ”bookmark” file and URL-it!

Commands and Topics

	Installation
	Use and Navigation
	File menu
	View menu
	URLegal menu
	HTTP Codes
	User Settings and Results Filtering
	Repairing Bad Pages
	Legal
	Registering
	Other ShareWare Applications
	What is New


Installation

Simply copy all files to a new directory of your choice. Read the important Legal information before use.

The application is urlegal.exe. Launch URLegal and select a file with HTML links (like a bookmark file) and URLegal will automatically check all the links and report the results (which links are broken).

That's it!


URLegal menu commands

The URLegal menu offers the following commands:

Settings	Refer to the Settings topic.
Stop Test	Pretty plain, eh. Once stopped, URLegal can be resumed without exiting the application. A toolbar button is also supported for this function.
Register	If you copy is not registered, this pick displays a dialog to permit you to register your copy with codes provided by the author.


User Settings and Results Filtering

Settings and How You Can Filter the Testing Results

The Settings pick on the  URLegal menu let you adjust what gets reported as errors (the testing results). There are 21 cases or problem codes. The first 15 problem codes map onto those HTTP codes specified by RFP1945. The remaining 6 problem codes are the author’s description of errors in the Winsock connection establishment and maintenance phase including a general timeout case.

You can think of the first 15 problem codes as meaning “URLegal connected to some host but the Web page had a problem”. (Actually, the first code, 200, means everything is OK.) That is, the code is derived from the reply message of the host.

The remaining 6 problem codes were created by the author and mean URLegal could not get to the host or could not get any decent response from the host.

Refer to the HTTP Codes topic for the RFP1945 official definitions of the first 15 problem codes.

Turning to the remaining 6 problem codes, the last code, “Host Took Too Long to Respond”, is a general timeout case - usually this corresponds to the message that Netscape Navigator gives you stating “The server could be down or not responding”.  That is, things are probably OK but we aren’t going to wait forever. Likewise, the “Can’t Connect to Host”  code is a timeout and may be a little more serious but is not conclusive. The  “Can’t Find Named Host” code reflects a serious problem and corresponds to the message that Netscape Navigator gives you stating “The server does not have a DNS entry”. The three codes “Unspecified Socket Error", "Request for Invalid Port or Name" and "Can't Establish Socket" are more internal winsock type problems that you will rarely, if ever, see and they probably not a URL problem, per se. They could be caused if you did not dial-up your Internet Service Provider (ISP) first launching URLegal; while URLegal is pretty good, it can’t dial the phone for you!

The small edit box on the dialog lets you set the length of this general timeout to a value between 5 and 50 seconds.

Two default settings are provided depending on how obsessed you are. The “Type B User” settings should be enough for most users. For example, a lot of pages return the HTTP 302 code even though they are perfectly OK. The Type B User lets these pass. Likewise, the “benign” timeout cases are filtered out.

However, if you want to know everything, choose the “Type A User” settings. In fact, URLegal ships with those settings just so you get a feel of the things that URLegal can report (and how many less-than-perfect pages are out there).

Of course, you can use the check boxes next to each cod to crate a custom filter. Any filter choices are persistent across URLegal sessions. They may even be changed on-the-fly while testing.

Finally, there is a general purpose code named UNKNOWN REASON. This is the “all else fails” error message that URLegal makes when it cannot attribute the error to any of the other 21 codes. It will always be produced to the text window (it is not user-filterable). What causes these? The most common problem is bad HTML source file syntax - use a “lint” checker if you are a poor HTML author. Other causes are servers whose responses are other than those specified by the RFC1945 HTTP spec (such servers do exist).

A toolbar button is also supported for this function.


Files menu commands

This menu pick has two specific functions (discussed below) and the typical printing functions.

Select Files	This command launches a dialog so you can choose a single file to test. Check boxes on the dialog permit you to specify if you want to also test other files in this directory and/or all sub-directories. The phrase “other files” means files with extension of .htm, .html, .shtm or .shtml. However, any single file will be tested regardless of its extension if neither check box is selected. Note that URLegal will only operate on multiple files for Registered Users. A toolbar button is also supported for this function.
Re-test Failed Links	Once the testing is complete, the text window will have the results and there may be errors shown. These may have been caused because the link is broken or it may have occurred simply because the server was temporarily busy. Refer to the HTTP Codes topic for more information on failed links. Using this menu pick re-exercises the failed links (only). URLegal automatically saves present results (the window text) to a temporary file, clears the text window and re-runs the test on the temporary file as though you had manually picked it. The temporary file is automatically deleted when URLegal is exited. A toolbar button is also supported for this function.
Export Results	This pick launches a dialog that lets you store the contents of the window (the testing report) as either a text file (e.g. for Notepad) or as an HTML file (e.g. for Netscape). A toolbar button is also supported for this function.
Remove Bad Links	Refer to the Remove bad Links topic.

A point you might want to consider in your testing of files is any local drive cache. Depending on your browser, your test may be only taking you to the cache and not onto the network. Thus a bad (but cached) link might not be reported. It depends on how your browser works.

Also, URLegal does not advertise itself as being able to overcome bad HTML syntax. Perhaps you should use on the “lint” checkers if you find that URLegal is reporting UNKNOWN REASON error as the “Reason Code” (although bad HTML syntax is not the only cause of this code).


Disabling Bad Links

Disabling Bad Links (Page Repair)

Take me to the Background topic or just give me the Facts .

Background

The whole point of URLegal is to automate the process of HTTP link management. Thus, it is natural that URLegal offers an automated way to repair the pages on which the bad links are found.

Five important points:

First, nothing is edited (repaired or removed) until after a backup file is made. The backup of your HTML source has the same filename with the extension .bak

Second, URLegal does not repair the link itself i.e. URLegal can’t magically make a deleted page on some distant server come to life again. However, URLegal can repair your page and its reference to that distant, bad page. URLegal does this by disabling the URL hyper-link.

Third, URLegal only operates (tests) HTTP links. HTML anchors which have FTP, Gopher or other protocol for hyper-links are not tested. Thus, only HTTP links are reported as results and so only HTTP links can be repaired.

Fourth, similar to the above, URLegal only operates (tests) remote HTTP links i.e. links somewhere out there on the Internet. URLegal does not validate the pointers within you site’s pages (i.e. those links pointing to pages on your hard drive).

Fifth and very important for the “URL Link Disable and File Repair” dialog box is that the repair process can only work on source files that are plain ASCII which use carriage-return line-feed (CRLF) pairs to delimit lines.

This fifth point is important so lets discuss it further. Did you know that the CRLF means nothing to a HTML file (per the spec)? Don’t think so? Try this: Take one of your pages and find a nice long URL. Now, right in the middle of it, type in a bunch of carriage returns. Save it and reload the page into your browser. How does your browser react to that radical change in the HTML source? The fact is that it should ignore it (Netscape does).

However, in order to do the page repair, URLegal assumes (requires) that you have the HTML source using CRLFs to delimit lines. This assumption is not too radical.

(A subtle point is that while URLegal’s automated repair process relies on an CRLF-based file, the fact is that URLegal will successfully and completely test pages that do not have CRLFs - thus, the test portion complies with HTML spec. It is just the repair portion that makes the CRLF assumption. Not satisfied? Then do the editing by hand.)

Now, onto the dialog box…

Facts

If your HTML source file is not an ASCII file or you did not use carriage-return line-feeds (CRLFs) to delimit the lines of text in your HTML source file then hit the “URL Link Disable and File Repair” dialog’s CANCEL button now and shut down this Help topic. Your page repair must be done manually.

Confused? Let’s put it this way, the Netscape bookmark.htm file is an ASCII text file and its lines are delimited by CRLFs. Anything created by Notepad is like this, too. So if your own HTML source files kinda look like a .txt file or a bookmark file, then you are OK - URLegal can automatically repair pages containing the broken links it has found.

Still with us? OK! Now you have one of two choices:

In either case, nothing is edited (repaired or removed) until after a backup file is made. The backup of your HTML source has the same filename with the extension .bak.  Further, no text is actually removed from your source file (this is new behavior in URLegal Version 1.2).

The first of the two choices in the dialog box will cause URLegal to open the file in which the offending URL is contained and find the line of text containing this URL. Then the entire CRLF-delimited line that contains the bad URL will be converted into an HTML “comment” bracketed by the <!-- and --> HTML tags.. This is a good choice if you are sure that there is only one URL per CRLF-delimited line in you HTML source. Remember, the whole line becomes a “comment” - not just the URL.

The second of the two choices will cause URLegal to open the file in which the offending URL is contained and find the text string that is the bad URL. Then the URL text string is replaced by the name of the file (the now-opened file on your computer in which the offending URL now lives). Also, the bad URL is converted into an HTML “comment” bracketed by the <!-- and --> HTML tags and added to the file immediately after the present anchor’s closing </A> tag. Why do this, you ask? If you are unsure about deleting entire lines then this is a safe choice. Why substitute the file’s name? It is also a safe choice as it will not take your browser to another page when you examine this link in the repaired page. Plus, it is easy to do a “Find...” with your text editor to navigate to the altered lines when you want to do some manual editing. Further, this choice will not cause URLegal to declare the link suspect upon further re-test (remember, URLegal does not test local links).

Just in case it isn’t clear, the URLs being operated on (in either case) are exactly those URLs listed in the URLegal’s main text window when you launched the “URL Link Disable and File Repair” dialog. This means URLegal will automatically repair the results of single or multi-page tests (or do no repairs at all if all tests were successful).

Illegal HTML syntax in the source file can cause the repair to alter more source than intended. URLegal is not designed to diagnose bad syntax in HTML source files although it sometimes will.  Use a “lint” checker if you are a poor HTML author. Also, URLegal may not be immune to fiendishly clever (but legal) HTML code.

Finally, you are prompted prior to repair if the testing uncovered a bad link but had to report the general purpose code named UNKNOWN REASON error. You may wish to examine such URLs before committing to the repair. The UNKNOWN REASON error case can be due to bad HTML syntax in which case the repair could do some damage to neighboring, good links in your HTML source. Inspect the main results window text.

Did I mention that nothing is edited (repaired) until a backup file is made first? However, a second invocation of the repair of a particular page will create a new .bak file which will over-write the original .bak file (unless you move or rename it in advance).

Hope this helped!


View menu commands

This menu pick has one specific functions (discussed below) and the typical viewing functions.

Choose Font	The user choice of font (face, weight and height) can be made. This is preserved across sessions.
Clear Window	This pick simply clears the window text.


Use and Navigation

URLegal permits quick and easy testing of HTTP links in HTML documents. The links for one or more files can ge automatically tested and pages with bad links can be automatically edited.

When launched, URLegal lets you pick one or more files to examine. The files are tested by extracting the links and “connecting” to each server for that link. The results of the test(s) are displayed in the text window and can be exported to a text file or an HTML file.

Using the “re-run” button, a single mouse click lets you completely re-test only the failed links (without wasting time re-testing all the good ones). This is useful as URLegal may be forced to declare some links as broken when the real problem is that the target server is very slow.

Alternately, you can use 21 different filtering options to customize the reporting of results.

Refer to the URLegal Menu and the File Menu topics for details on how URLegal operates.

Refer to the HTTP Codes topic for general information on failed links. Refer the Settings for specific information on filtering report results and to the Repari topic for specific information on repairing pages with bad links.

Note that URLegal only operates (tests) HTTP links. HTML anchors which have FTP, Gopher or other protocols for hyper-links are not tested. Thus, only HTTP links are reported as results and so only HTTP links can be repaired. Similarly, URLegal only operates (tests) remote HTTP links i.e. links somewhere out there on the Internet. URLegal does not validate the pointers within you site’s pages (i.e. those links pointing to pages on your hard drive).

When URLegal is attempting to contact a busy (or non-existent) site the application will appear “dead” for a while (maybe 30 seconds). In this context “dead” means that the screen might not re-paint and the application is slow to respond to mouse clicks. Moreover, after testing a file with many URL pointing to such sites, using the “re-run” feature may cause the application to appear to hang for while a while as many slow sites will be encountered back-to-back. Be patient; go get a cup of coffee. Don’t panic.


HTTP Codes

Per RFC1945, the HTTP standard, the following codes are defined.

200	OK

201	Created

202	Accepted

204	No Content

301	Moved Permanently

302	Moved Temporarily

304	Not Modified

400	Bad Request

401	Unauthorized

403	Forbidden

404	Not Found

500	Internal Server Error

501	Not Implemented

502	Bad Gateway

503	Service Unavailable

The 302 code is a little odd - some pages will always have 302 but still be very legal links.

Note that 1945 does not provide a lot of elaboration on these codes (i.e. “what do they really mean”).


Registering

URLegal is distributed as Shareware. It is not free or public domain. This means you may copy and distribute it freely but should you find it useful and use it beyond an initial evaluation period of 30 days you are obliged to pay the license fee.

The single user license fee is US$20. More is accepted if you find this software of superior value!

You can register this program by mail. Cash or checks/cheques can be accepted in any major currency, equivalent in value to US$20 per copy. Cash is preferred. Please use the Shareware Registration form.

Registered users will be sent a registration number to disable the reminder box. This number will be good for all subsequent Shareware versions of the program that may become available.

If you enjoy this software, do the decent thing and register!

I would be pleased to receive any comments, bug reports or suggestions for future releases. I may be contacted by e-mail at pgerhart@voicenet.com.


Other Applications

Other ShareWare Applications by the Author

QuickChart

QuickChart permits quick and easy viewing, printing and navigation for financial data stored in MetaStock or CompuTrac format. The user is presented with crisp, clean charts.

The color scheme of the chart may be user configured. Charts may show volume and user-defined moving averages.

Toolbar buttons, arrow keys and a right mouse popup menu enable navigation among the charts. In addition, a SlideShow mode is supported to automatically sequence through a portfolio.

QuickChart is small and fast - an alternative to financial fatware.

FullDisk

FullDisk permits quick and easy profiling of the contents of a local or network drive. Menu selections permit:

rescanning as needed

choosing the units for display results (bytes, kilobytes or megabytes)

When launched, FullDisk searches your drive for all sub-directory trees and the file sizes therein starting with the currently selected drive. A color-coded list box shows the results and a pie-chart depicts the usage within that tree / drive.

MetaFix

MetaFix permits you to modify the disk files for MetaStock or CompuTrac format data including:

	editing a single quote
	adjusting a quote series for a split
	adjusting a quote series for Price or Volume multipliers
	deleting a quote
	displaying underlying facts about a quote series
	automatically scanning for potential splits

No files are ever deleted - any edited .DAT file is first saved with the extension .BAK. This is unlike comparable applications! Also, the automatic split-search is unique and provides suggested split ratios for both forward and reverse splits.

MetaFix is small and fast - an alternative to competitive financial fatware.

Tickle

Tickle keeps some “heartbeat” activity on your Internet connection so neither the Internet Service Providers (ISP) or Windows95 will hang-up on you as a result of prolonged line inactivity.

When launched, Tickle lets you pick a “time” and a “domain name”. The “time” is how often the “heartbeat” will be sent. The “domain name” can be any Web presence site e.g. www.usps.gov, the United States Postal Service. “Dot notation” names (IP addresses) are also permitted.

Contact me by e-mail at pgerhart@voicenet.com or visit my ShareWare site at http://www.voicenet.com/~pgerhart/_shware.html.


Registration Form

Print this form and send it with your remittance to:

Paul Gerhart

101 Magella Court

North Wales, Pennsylvania

19454 USA

Please give an e-Mail address if you have one so I can inform you of your registration code as soon as I receive your order, and give timely information on upgrades.

URLegal Registration Form.

I wish to register ____ copies of URLegal .

I enclose a check for $US______	($20 per copy)

I enclose cash for $US______	($20 per copy)

Name(s)	_______________________________________________

Company	_______________________________________________

Address	_______________________________________________

_______________________________________________

_______________________________________________

Code	___________________

Country	___________________

E-Mail	___________________

Where did you obtain URLegal from? _____________________________

It would be helpful for me if you could tell me how you use the program. I can then use this information when planning new features for future versions. Also provide any comments/suggestions.

______________________________________________________________________

______________________________________________________________________

______________________________________________________________________

______________________________________________________________________

Thank you!


Important Legal Stuff

Disclaimer and Agreement

Copyright

Registering

License


Disclaimer and Agreement
Disclaimer of Warranty

Users of URLegal must accept this disclaimer of warranty. If you do not accept this

disclaimer, do not use URLegal.

"URLegal IS SUPPLIED AS IS. THE AUTHOR DISCLAIMS ALL WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, WHICH MAY RESULT FROM THE USE OF URLegal EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES."


Copyright

URLegal is protected by US and international copyright laws.

URLegal is distributed as Shareware. It is not free or public domain. This means you may copy and distribute it per the License but should you find it useful and use it beyond an initial evaluation period of 30 days you are obliged to pay the license fee.

Unregistered use of URLegal after the 30-day evaluation period is in violation of federal copyright laws.

Click here for Shareware Registration form. If you find URLegal useful, do the decent thing and register!

URLegal Copyright © 1996.


License

You should carefully read the following terms and conditions before using this software.  Use of this software indicates your acceptance of these terms and conditions.  If you do not agree with them, do not use the software. All presumption of warranty is disclaimed - see the Disclaimer of Warranty for the specific language.

You are hereby licensed to:  use the Shareware Version of the software for a 30-day evaluation period; make as many copies of the Shareware version of this software and documentation as you wish; give exact copies of the original Shareware version to anyone; and distribute the Shareware version of the software and documentation in its unmodified form via electronic means.  There is no charge for any of the above.

You are granted a limited license to use URLegal, to copy and distribute it, provided the following conditions are met:

1.	No fee may be charged for such copying and distribution other than actual costs incurred, except for a nominal distribution fee.
2.	URLegal may ONLY be distributed in its original, unmodified state, complete with data files and this documentation.
3.	URLegal may not be distributed as part of a package or group of programs.
4.	The paid registered version may NOT be distributed.


What is New

What is New in 1.5?

Fixed

Fixed bug where insufficient memory allocated for certain server responses.

Improved

Removed the selections for color, underline and strike-through from the Font dialog box (these were not supported anyway).

Increased the amount of text that could be displayed in the main window. (Thanks, Sam.)

What is New in 1.3?

Fixed

Fixed bug where files search was somewhat case-sensitive. (Thanks, Sam.)

What is New in 1.3?

Fixed

Fixed bug where certain anchors not identified - thanks to JDM (and his unusual HTML style).

Fixed bug where “ReRun” feature stopped working between 1.1 and 1.2.

What is New in 1.2?

New Features

Added the site name for each URL to the report window and results file (in both formats).

Preserved the window size and position across sessions.

Added automatic inclusion of Server Side Include files with .shtm and .shtml extensions in the multiple-file test selection dialog box.

Added display of the start and end time of the testing in the main text window (and thus the .txt export)

Added a discussion in this Help file on re-painting delays.

Added dialog to ask if previous exported file should be overwritten when the names are the same.

The progress dialog now also shows the actual file and URL counts.

Improvements

The results report now lists the total number of URLs tested in addition to the number in error.

Removed the “advertising” from the .html  results export file for registered users.

When using file repair in the “replace” mode, the bad URL is preserved in the file as an HTML comment.

When using file repair in the “remove” mode, the line of text that contained the bad URL is preserved in the file as an HTML comment.

Changed the registration password computation.

Fixes

Fixed bug where CRLFs were not filtered out when acquiring the URL from the target file.

Fixed bug where encouragement to register was included in .html results export for registered users.

Many thanks to Pete in Australia for putting Version 1.1 through the ringer.