diff options
-rwxr-xr-x | httpd/cgi-bin/check | 15 | ||||
-rw-r--r-- | share/templates/en_US/fatal-error.tmpl | 13 |
2 files changed, 24 insertions, 4 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index d6b09df..fef63cb 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -9,7 +9,7 @@ # This source code is available under the license at: # http://www.w3.org/Consortium/Legal/copyright-software # -# $Id: check,v 1.431 2005-07-27 09:23:51 ot Exp $ +# $Id: check,v 1.432 2005-07-29 06:26:15 ot Exp $ # # Disable buffering on STDOUT! @@ -204,7 +204,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.431 $; + $VERSION = q$Revision: 1.432 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -1015,8 +1015,15 @@ sub handle_uri { unless ($ua->is_protocol_supported($uri)) { $File->{'Error Flagged'} = TRUE; - $File->{E}->param(fatal_uri_error => TRUE); - $File->{E}->param(fatal_uri_scheme => $uri->scheme()); + if (($uri->canonical() eq "1") ) + #if uri param is empty (also for empty direct or upload), it's been set to TRUE in sub prepCGI() + { + $File->{E}->param(fatal_no_content => TRUE); + } + else { + $File->{E}->param(fatal_uri_error => TRUE); + $File->{E}->param(fatal_uri_scheme => $uri->scheme()); + } return $File; } diff --git a/share/templates/en_US/fatal-error.tmpl b/share/templates/en_US/fatal-error.tmpl index 72a6a8f..be6879e 100644 --- a/share/templates/en_US/fatal-error.tmpl +++ b/share/templates/en_US/fatal-error.tmpl @@ -58,6 +58,19 @@ using the File Upload interface. </p> </TMPL_IF> +<TMPL_IF NAME="fatal_no_content"> + <p> + Sorry, I could not find any content to validate. It is probable that you + clicked on the "check" button without choosing a URL, a file or entering + the content of the document you would like to validate. + </p> + <p> + Read the <a href="docs/users.html">User's guide</a> for quick instructions + on using this validator. + </p> +</TMPL_IF> + + <TMPL_IF NAME="fatal_ip_error"> <p> |