Trailing period on host-name in URL causes Additional characters to be inserted into HTTP request when a link is followed




9 years ago
9 years ago


(Reporter: Robert M. Enger, Unassigned)


Firefox Tracking Flags

(Not tracked)





9 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090715 Firefox/3.5.1 (.NET CLR 3.5.30729)

Firefox seems to add characters "/i/sct-mid2" to the URL when I click on a link.
Problem occurs when one uses the maximally qualfiied DNS name for a host (ie explicitly include the trailing period at the end of the DNS name (e.g. )   Trailing period is a valid DNS name syntax, and is maximally qualified (ensuring resolvers will not attempt to suffix local domain-name onto the host-name supplied).  Not a common thing to do, but it is valid.

If I hover the mouse over a given link, the URL that is displayed in the status-bar at the bottom of Firefox is correct.  If I actually click on the link, then the link fails, a page-not-found message is returned and the URL shown at the top of the page (and in the failure message) shows the extra characters noted above have been inserted into the HTTP request.  If I use "copy link location" to grab the URL of the link, and then paste it directly into the destination box at the top of Firefox and hit return, everything works fine.  The issue is internal to firefox: some piece of code is being "fooled" by the presence of the extra period at the end of the host-name portion of the URL.

Reproducible: Always

Steps to Reproduce:
1.  Go to TheRegister page: 
2.  Hover mouse over link for article titled "Windows XP Mode digs deeper into Windows 7".  You will see a valid URL displayed in the status bar at bottom of the page (and made available by using "copy link location" with the right-mouse click.  Here it is 
3.  Click on the link
4.  Receive the error message and note the following URL has been requested: 
Actual Results:  

You don't have permission to access /i/sct-mid2/ on this server.
Apache/2.2.3 (Debian) Server at Port 80

Expected Results:  
Contents from this page:
[sample content below: I used "copy link location" and then pasted it into the destination box at the top of Firefox in order to get this sample]

Windows XP Mode digs deeper into Windows 7

    * Track this topic
    * Print story
    * Post comment

Legacy hold out

By Gavin Clarke in San Francisco • Get more from this author

Posted in Operating Systems, 4th August 2009 15:02 GMT

Migrate from Solaris to Red Hat on IBM

Microsoft has released polished code for desktop virtualization software to run legacy Windows XP applications on machines loaded with Windows 7.

I ran HTTP Live Headers.  It appears that Firefox is indeed requesting the wrong link (even though the CORRECT link is displayed in the status-bar during hovering, and available for capture using "Copy Link Location".

#request# GET
GET /i/sct-mid2/

HTTP Headers:

GET /i/sct-mid2/ HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090715 Firefox/3.5.1 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

HTTP/1.x 403 Forbidden
Date: Wed, 05 Aug 2009 11:42:41 GMT
Server: Apache/2.2.3 (Debian)
Content-Length: 371
Keep-Alive: timeout=3, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1

SHOW SOURCE:  I asked Firefox to show the source.  I think this is the correct section of text relevant to the link.  As you see the HREF section is properly formatted (no extra characters).

<div class="story-ref last">

<h3><a href="/2009/08/04/windows_xp_mode_release_candidate/"><img width="75" height="75" alt="Microsoft" src="">Windows XP Mode digs deeper into Windows 7</a></h3>
<p class="standfirst">Legacy hold out</p>

Comment 1

9 years ago
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090729 Firefox/3.5.2

Can't reproduce.

Comment 2

9 years ago
Not only can this be reproduced, it can be reproduced with IE.  :-(

This is clearly some sort of web-site error.
I was fooled (because I don't know enough about web browsers, etc) when I saw the correct request string visible in the status bar when the mouse is hovering over the link.  

What I failed to realize is that the host reported in the error message is "".  When I finally saw this (staring me in the face all along) I went spelunking.  I found a javascript file ("Design/javascript/_.js") that referenced this host.  The file contains many many lines of (for me) impenetrable script.  Undoubtedly, they are parsing the mouse-click-on-the-link request and transmuting it before issuing the actual HTTP request.  I'm guessing that their parsing code is not written so well (and is being fooled by the trailing period).

Sorry to have raised a false alarm.

I have Firebug loaded.  Where should I have been looking in the Firebug output in order to see the errant transmutation?  Net and Yslow don't seem to reveal the execution of the js.  

Last Resolved: 9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.