Last Comment Bug 438288 - URI.path one character short after redirect involving fragment
: URI.path one character short after redirect involving fragment
Status: VERIFIED FIXED
: fixed1.9.0.2, testcase, verified1.8.1.17, verified1.9.1
Product: Core
Classification: Components
Component: Networking (show other bugs)
: unspecified
: All All
: P2 normal (vote)
: mozilla1.9.1a1
Assigned To: Mats Palmgren (vacation)
:
Mentors:
http://www.meyerweb.com/#thoughts
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-10 01:04 PDT by John P Baker
Modified: 2009-04-14 09:38 PDT (History)
8 users (show)
jonas: blocking1.9.1+
mbeltzner: blocking1.9-
dveditz: wanted1.8.1.x+
mats: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
extension to alert path and spec on history visit (2.09 KB, application/x-xpinstall)
2008-06-10 01:06 PDT, John P Baker
no flags Details
Patch rev. 1 (3.58 KB, patch)
2008-06-10 09:46 PDT, Mats Palmgren (vacation)
cbiesinger: review+
cbiesinger: superreview+
dveditz: approval1.8.1.17+
samuel.sidler+old: approval1.9.0.2+
Details | Diff | Splinter Review
unit test JS (4.23 KB, text/plain)
2008-09-02 17:28 PDT, Mats Palmgren (vacation)
no flags Details
test-harness-head.js (8.32 KB, text/plain)
2008-09-02 17:32 PDT, Mats Palmgren (vacation)
no flags Details
unit test HTML (461 bytes, text/html)
2008-09-02 17:34 PDT, Mats Palmgren (vacation)
no flags Details

Description John P Baker 2008-06-10 01:04:10 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9pre) Gecko/2008060906 Minefield/3.0pre
Build Identifier: 

URI.path is missing the last character of the fragment after a redirect - URI.spec is correct.

Reproducible: Always

Steps to Reproduce:
1. Install the attached extension
2. Go to http://www.meyerweb.com/#thoughts
   (redirects to http://meyerweb.com/#thoughts)
Actual Results:  
The path in the second alert is /#thought

Expected Results:  
The path should be /#thoughts on both alerts

Sorry that the test involves an extension; It is basically my WIP with an alert to debug it, and then the guts removed to just alert the spec and path, on history visit, of any URI involving a fragment.
Comment 1 John P Baker 2008-06-10 01:06:11 PDT
Created attachment 324412 [details]
extension to alert path and spec on history visit
Comment 2 Mats Palmgren (vacation) 2008-06-10 09:46:46 PDT
Created attachment 324466 [details] [diff] [review]
Patch rev. 1
Comment 3 Lucas Malor (mail: c6kfnkn2uc AT snkmail DOT c0m) 2008-06-12 07:26:35 PDT
Severity to Major?

The bug affects also Fx2? Otherwise Version must be changed to 3.0 or Trunk.

I request Blocking (or else Wanted) opinion.
Comment 4 Mike Beltzner [:beltzner, not reading bugmail] 2008-06-12 09:57:40 PDT
Can we get an answer to what versions this bug touches?
Comment 5 Mats Palmgren (vacation) 2008-06-19 16:05:22 PDT
(In reply to comment #4)
> Can we get an answer to what versions this bug touches?

Code inspection suggests all versions since 2001-11-15.
I tested it occurs in 2.0.0.14, but I haven't tested older builds.
Rev. 1.1:
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/netwerk/base/src/nsStandardURL.cpp&rev=1.1&root=/cvsroot&mark=1374,1376,1380#1345
Rev. 1.110 (CVS tip):
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/netwerk/base/src/nsStandardURL.cpp&rev=1.110&root=/cvsroot&mark=2205,2207,2222#2171
Comment 6 Mats Palmgren (vacation) 2008-06-19 16:06:18 PDT
http://hg.mozilla.org/mozilla-central/index.cgi/rev/f0aec487ed11

-> FIXED
Comment 7 Mats Palmgren (vacation) 2008-07-25 08:01:56 PDT
Comment on attachment 324466 [details] [diff] [review]
Patch rev. 1

Do we want this on branches?
Comment 8 Samuel Sidler (old account; do not CC) 2008-07-29 17:07:25 PDT
Comment on attachment 324466 [details] [diff] [review]
Patch rev. 1

Approved for 1.9.0.2. Please land in CVS. a=ss
Comment 9 Mats Palmgren (vacation) 2008-07-30 19:17:04 PDT
Landed in CVS trunk:
mozilla/netwerk/base/src/nsStandardURL.cpp 	1.111
mozilla/netwerk/test/unit/test_standardurl.js 	1.3 
Comment 10 Daniel Veditz [:dveditz] 2008-08-04 11:33:42 PDT
Comment on attachment 324466 [details] [diff] [review]
Patch rev. 1

Approved for 1.8.1.17, a=dveditz for release-drivers
Comment 11 Mats Palmgren (vacation) 2008-08-07 15:16:50 PDT
Landed on MOZILLA_1_8_BRANCH:
mozilla/netwerk/base/src/nsStandardURL.cpp 	1.82.4.12 

(netwerk/test/unit/test_standardurl.js doesn't exist on this branch
so I couldn't apply the unit test part of the patch)
Comment 12 Al Billings [:abillings] 2008-09-02 16:56:18 PDT
(In reply to comment #0)
> Steps to Reproduce:
> 1. Install the attached extension
> 2. Go to http://www.meyerweb.com/#thoughts
>    (redirects to http://meyerweb.com/#thoughts)

This extension is Firefox 3+ only. We need a way to verify this for 2.0.0.17, which includes this fix.
Comment 13 Mats Palmgren (vacation) 2008-09-02 17:28:18 PDT
Created attachment 336588 [details]
unit test JS
Comment 14 Mats Palmgren (vacation) 2008-09-02 17:32:23 PDT
Created attachment 336589 [details]
test-harness-head.js
Comment 15 Mats Palmgren (vacation) 2008-09-02 17:34:15 PDT
Created attachment 336591 [details]
unit test HTML

This is what I used to test 1.8 branch:
1. save this HTML file
2. save first JS file in the same directory, name it "438288.js"
3. save second JS file to "test-harness-head.js"
4. edit the file: URL in the HTML file to where "test-harness-head.js"
   is located on your system
Comment 16 Al Billings [:abillings] 2008-09-02 17:55:31 PDT
I am assuming a negative proof here? Using the above files, 2.0.0.16 states that the testcase failed in an alert. 2.0.0.17 doesn't say anything, it just renders an empty window without the alert. Is this correct?

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/2008082909 Firefox/2.0.0.17
Comment 17 Mats Palmgren (vacation) 2008-09-02 18:00:45 PDT
Correct.
Comment 18 Al Billings [:abillings] 2008-09-02 18:01:56 PDT
Verified then. Whew.
Comment 19 Aakash Desai [:aakashd] 2009-04-14 09:38:46 PDT
verified FIXED on builds: 
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090414 Minefield/3.6a1pre ID:20090414030735

and

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b4pre) Gecko/20090414 Shiretoko/3.5b4pre ID:20090414035212

Note You need to log in before you can comment on or make changes to this bug.