Mon, 02 Jul 2012
In IS MU, we log and evaluate errors in HTTP
requests, including "404 not found". When the
points back to our site, we try to look for a broken link.
Recently (last month or so), strange 404 requests started to appear in our
These requests point to the location
/undefined, with referrer
being our root document,
/. And the referrer is not fake,
there is always a successful request to
/ from the same IP
address from several seconds ago. Occasionally we get similar 404 requests,
with referrer being
We are not able to reproduce the problem. It is not User-Agent-specific
(altough most of the User-Agents with this problem are Chrome), and it
is not deterministic: we got tens of these 404 requests daily out of
milions total requests (and out of tens of thousands of requests to the
title page). These requests are always for a non-authenticated page, and
always for a page which is a directory (i.e. which is represented by the
index.pl document in that directory).
So, my dear lazyweb - any ideas what can be the cause of this behaviour?
UPDATE 2012/07/03: It is probably AJAX
Yesterday have added a new image to the 404 page which meets the above conditions (location ending with "
referrer being the location minus "
so far after > 12 hours I see exactly zero accesses to that image
in my Apache logs. So this error is most probably caused by something
that users can't see, i.e. AJAX requests. Not the
modification that himdel suggests in the coments.
2 replies for this story:
I think it's the autocompletion .. or, more specifically, ancient jQuery:
- go to /lide/
- there's this result handler: var span = document.createElement('span'); span.innerHTML = item; window.location = $(span).find("a").attr("href") + url_params;
- span gets set to <span></span>
- but $(span) yields null
- null has no find method, so the while $(span).find... expression yields undefined
- window.location = 'undefined' goes to /lide/undefined
Yenya wrote: Re: himdel
Thanks, I will look at the autocompletion. But this would mean item was set to an empty string. Moreover, I don't see any request to autocompletion (/naseptavac_data.pl) in my access logs before the request to /undefined is made.