On Thu, 20 Nov 2003, Matt Kettler wrote:

> Have you considered escaping the underscore? Although it's not required to
> escape an underscore in a URI by RFC standards, there's no reason you can't
> encode them as %2D.
>
> Thus:
>          http://www.example.com/my_file_name.htm
> becomes
>          http://www.example.com/my%2Dfile%2Dname.htm
>
> and should still work and be unmunged by SA in this setup. It's an ugly-ish
> workaround, but should work.

Duh, thanks for that suggestion.  But actually the decimal character
constant for an "_" is 95, which is 5F in hex.  So the URI would be:

        http://www.example.com/my%5Ffile%5Fname.htm

which did the trick nicely.

> Based on the code, it would probably be easier for them to allow you to
> "escape" the _ by doing a double or tripple underscore rather than a
> backslash.. But I can't see anywhere that it currently does that.

Yeah that would be nice, but your suggestion of escaping based on rfc2396
works perfectly and suits my needs.

> However, it would be a pretty gross assumption to assume that SA would
> _only_ parse the posted list of words and not parse all things surrounded
> by underscores. Generaly programs start off with a categorical behavior,
> not a long list of specific cases. It's generally easier and cleaner to
> code this way.

I suppose, but I interpret what I read on the man page literally.  I can
accept that it isn't a bug, but a mention in the man page that ANY string
enclosed by a "_" character will be parsed as a variable even if it isn't
one would be nice.


Thanks for the help,

Matt

-- 
Matthew S. Cramer <[EMAIL PROTECTED]>          Office: 717-396-5032
Infrastructure Security Analyst                     Fax:    717-396-5590
Armstrong World Industries, Inc.                    Cell:   717-917-7099



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to