[FX.php List] Odd browser bug or?
Kevin Futter
kfutter at sbc.melb.catholic.edu.au
Mon Apr 30 17:06:44 MDT 2007
On 30/4/07 6:31 PM, "Erik Andreas Cayré" <erik at cayre.dk> wrote:
> I've spent some hours looking through my error log for www.dagkort.dk
> to fix whatever may be left to fix.
>
> One recurring error which I don't undestand is this:
>
> URL: /?p=assoc&assoc=58
>
> To the best og my knowledge noone should be accessing an URL like
> this, instead accessing:
>
> URL: /?p=assoc&assoc=58 (which works fine)
>
> I've checked my site (though not completely exhaustively), and I
> couln't find any links misspelled to result in the above...
> I see the error generated by several different User-Agents, both
> browsers (MSIE 5.0 Win98) and crawlers (eg. nicebot)
>
> Doeas anyone on the list know of some bug or other plausible
> explanation for this?
> I'm guessing certain browsers/crawlers mey erroneously attempt to
> access an URL like the above, but I'm not certain.
>
> Any suggestions?
As Dale has already pointed out, & is the HTML entity representing the
ampersand character. It's actually a requirement of the spec that all
ampersands in HTMl, INCLUDING URLs*, be encoded (either by entity or
character reference). So, the URL causing the error is actually not only
legitimate, but matching the spec exactly, and shouldn't be causing an
error. I'd say that the user agents involved are choking on it. However, if
you're not doing any manual or automatic encoding yourself, the real
question becomes how did it get there?
* The reason for this is that compliant browsers treat the ampersand as the
beginning of an entity, and that's its only valid function is HTML. So,
query string joins using the ampersand risk being interpreted as entities,
and if the characters that follow the ampersand actually make up a
recognisable entity, they'll be parsed as such and the URL will fail (I've
seen it happen!). If you encode the ampersand as an entity, it's parsed
properly as an ampersand, not the beginning of an entity. Sounds circular I
know, but that's how it works.
--
Kevin Futter
Webmaster, St. Bernard's College
http://www.sbc.melb.catholic.edu.au/
#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared
by MailMarshal
#####################################################################################
This e-mail and any attachments may be confidential. You must not disclose or use the information in this e-mail if you are not the intended recipient. If you have received this e-mail in error, please notify us immediately and delete the e-mail and all copies. The College does not guarantee that this e-mail is virus or error free. The attached files are provided and may only be used on the basis that the user assumes all responsibility for any loss, damage or consequence resulting directly or indirectly from the use of the attached files, whether caused by the negligence of the sender or not. The content and opinions in this e-mail are not necessarily those of the College.
More information about the FX.php_List
mailing list