Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Sensible error handling

by crenz (Priest)
on May 02, 2003 at 18:25 UTC ( #255115=note: print w/replies, xml ) Need Help??

in reply to Sensible error handling

AFAIK, ";" is a perfectly valid separator for parameters and can be used instead of "&" (eg. http://myserver/page?msg=Hello+World;empty=;number=0). So it seems your parameter parsing code has a problem as well -- the invalid URLs aren't.

Apart from that, I second your statement -- it is often better to be a bit more liberal about validating your input than to throw unnecessary fatal errors at the user.

Replies are listed 'Best First'.
Re: Re: Sensible error handling
by vladb (Vicar) on May 02, 2003 at 19:03 UTC
    I didn't mention it, but this web application was running on a Tomcat web server, which didn't seem to recognize ';' as a valid query parameter delimiter. Regardless of the fact the web app was coded in Java, this issue of improper error handling is universal. In fact, I found similar instances in my other Perl web applications as well. ;-)

    # Under Construction
      If you read the W3 standards on this you'll find that & is the incorrect and outdated delimiter and ; is the favoured and the correct option. Nice to know Tomcat keeps up with such standards. :)

      As a side note, the module has supported both since the first release. -- footnote #26.

      - wil

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://255115]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2022-12-01 01:26 GMT
Find Nodes?
    Voting Booth?