The default bug view has changed. See this FAQ.

URI.path one character short after redirect involving fragment

VERIFIED FIXED in mozilla1.9.1a1

Status

()

Core
Networking
P2
normal
VERIFIED FIXED
9 years ago
8 years ago

People

(Reporter: John P Baker, Assigned: mats)

Tracking

(4 keywords)

unspecified
mozilla1.9.1a1
fixed1.9.0.2, testcase, verified1.8.1.17, verified1.9.1
Points:
---
Bug Flags:
blocking1.9.1 +
blocking1.9 -
wanted1.8.1.x +
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(5 attachments)

(Reporter)

Description

9 years ago
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.
(Reporter)

Comment 1

9 years ago
Created attachment 324412 [details]
extension to alert path and spec on history visit
(Assignee)

Updated

9 years ago
Assignee: nobody → mats.palmgren
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
OS: Windows 2000 → All
Hardware: PC → All
(Assignee)

Comment 2

9 years ago
Created attachment 324466 [details] [diff] [review]
Patch rev. 1
Attachment #324466 - Flags: superreview?(cbiesinger)
Attachment #324466 - Flags: review?(cbiesinger)
Attachment #324466 - Flags: superreview?(cbiesinger)
Attachment #324466 - Flags: superreview+
Attachment #324466 - Flags: review?(cbiesinger)
Attachment #324466 - Flags: review+
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.
Flags: wanted1.9.1?
Flags: blocking1.9?
Flags: blocking1.9.1?
Can we get an answer to what versions this bug touches?
Flags: blocking1.9? → blocking1.9-
Flags: wanted1.9.1?
Flags: blocking1.9.1?
Flags: blocking1.9.1+
Priority: -- → P2
(Assignee)

Comment 5

9 years ago
(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
(Assignee)

Comment 6

9 years ago
http://hg.mozilla.org/mozilla-central/index.cgi/rev/f0aec487ed11

-> FIXED
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1a1
(Assignee)

Comment 7

9 years ago
Comment on attachment 324466 [details] [diff] [review]
Patch rev. 1

Do we want this on branches?
Attachment #324466 - Flags: approval1.9.0.2?
Attachment #324466 - Flags: approval1.8.1.17?
Comment on attachment 324466 [details] [diff] [review]
Patch rev. 1

Approved for 1.9.0.2. Please land in CVS. a=ss
Attachment #324466 - Flags: approval1.9.0.2? → approval1.9.0.2+
(Assignee)

Updated

9 years ago
Depends on: 448617
(Assignee)

Comment 9

9 years ago
Landed in CVS trunk:
mozilla/netwerk/base/src/nsStandardURL.cpp 	1.111
mozilla/netwerk/test/unit/test_standardurl.js 	1.3 
Keywords: fixed1.9.0.2
(Assignee)

Updated

9 years ago
No longer depends on: 448617
Flags: wanted1.8.1.x+
Comment on attachment 324466 [details] [diff] [review]
Patch rev. 1

Approved for 1.8.1.17, a=dveditz for release-drivers
Attachment #324466 - Flags: approval1.8.1.17? → approval1.8.1.17+
(Assignee)

Comment 11

9 years ago
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)
Keywords: fixed1.8.1.17
(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.
(Assignee)

Comment 13

9 years ago
Created attachment 336588 [details]
unit test JS
(Assignee)

Comment 14

9 years ago
Created attachment 336589 [details]
test-harness-head.js
(Assignee)

Comment 15

9 years ago
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
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
(Assignee)

Comment 17

9 years ago
Correct.
Verified then. Whew.
Keywords: fixed1.8.1.17 → verified1.8.1.17
Keywords: fixed1.9.1
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
Status: RESOLVED → VERIFIED
Keywords: fixed1.9.1 → verified1.9.1
You need to log in before you can comment on or make changes to this bug.