document.cookie doesn't work in files served as application/xhtml+xml

VERIFIED DUPLICATE of bug 111514

Status

()

Core
Networking: Cookies
VERIFIED DUPLICATE of bug 111514
17 years ago
14 years ago

People

(Reporter: Paul Sowden, Assigned: Stephen P. Morse)

Tracking

Trunk
mozilla1.0
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.8) Gecko/20020204
BuildID:    2002-02-04-06

When a cookie is attempted to be set using document.cookie the string passed is
simply stored in the variable document.cookie instead of being parsed and added
as a cookie.

The problem also seems to persist when using PHP to set cookies

Reproducible: Always
Steps to Reproduce:
1. Load up the page
2. A cookie "test" is attempted to be made, but the string is smply stored and
no cookie is saved.


Actual Results:  The string passed to document.cookie is stored under that
variable instead of being parsed and saved as a cookie

Expected Results:  a cookie called "test" should be created
(Assignee)

Comment 1

17 years ago
Works fine for me.  I downloaded the reporters test file to my hard disk and 
brought it up in the browser.  I got the alert saying "test=foo".  Then I went 
to the cookie-manager dialog and saw the test=foo cookie correctly stored there, 
and with the correct expiration time (24 hours ahead).
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 2

17 years ago
> I downloaded the reporters test file to my hard disk

The bug is only present when the document is served with content type
application/xhtml+xml and if the document is served as type text/html the
cookies work fine.

The document on my web server is being served as application/xhtml+xml.
(Assignee)

Comment 3

17 years ago
If you have a testcase on a webserver, then give the url for that and reopen 
the bug.  The url that you gave is for a file that gets downloaded.
(Reporter)

Comment 4

17 years ago
The testcase I gave from my server opened in my Mozilla (0.9.8 on win98).

I have tried saving it as a php file and sending the header "Content-Type:
application/xhtml+xml", so it should open as a file in Mozilla.

The problem is consistently showing up in my version (0.9.8 on win98) and my
dad's (0.9.8 on NT4).
(Assignee)

Comment 5

17 years ago
OK, I'm able to reproduce.  Don't know why I had a problem before.

Reopening and confirming.
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
(Assignee)

Updated

17 years ago
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → mozilla1.0
Isn't this just another face of the "application/xhtml+xml produces an
XMLDocument, not an HTMLDocument" problem?  Hence there is no document.cookie
property in documents served as application/xhtml+xml

Comment 7

17 years ago
sure that's the problem, and it seems the only bug we have about it is bug 111514
(Assignee)

Comment 8

17 years ago

*** This bug has been marked as a duplicate of 111514 ***
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago17 years ago
Resolution: --- → DUPLICATE

Comment 9

14 years ago
V/dupe.
Status: RESOLVED → VERIFIED
QA Contact: tever → benc
You need to log in before you can comment on or make changes to this bug.