If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

document.cookie empty for XHTML document

RESOLVED INVALID

Status

()

Core
Networking: Cookies
RESOLVED INVALID
10 years ago
10 years ago

People

(Reporter: Jaroslav Zaruba, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.11;MEGAUPLOAD 1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.11;MEGAUPLOAD 1.0

I can see Set-Cookie in the responde headers yet the document.cookie property contains empty string for XHTML-document.
(I need to read cookies set by a server, hence sessionStorage is not a solution.)

Reproducible: Always

Steps to Reproduce:
1.
2.
3.

Comment 1

10 years ago
do the cookies get set at all (check, e.g., in the cookie manager)?
Component: General → Networking: Cookies
Product: Firefox → Core
QA Contact: general → networking.cookies
(Reporter)

Comment 2

10 years ago
yes, I can see it in the manager

Comment 3

10 years ago
this should work, since xhtml docs are nsHTMLDocuments, and document.cookie is handled there. will look into this sometime.

if you have an xhtml document you can post as a testcase, that'd make things easier for me. also - you're using firefox 2, right? and document.cookie works for you in other pages?
(Reporter)

Comment 4

10 years ago
(In reply to comment #3)
> this should work, since xhtml docs are nsHTMLDocuments, and document.cookie is
> handled there. will look into this sometime.

I have read comment reporting this behaviour also on developer.mozilla.org.

> if you have an xhtml document you can post as a testcase, that'd make things
> easier for me.

OK, I can make the test-case later in the evening or tomorrow.

> also - you're using firefox 2, right?

yes, I am using FF 2.0.0.11

> and document.cookie works for you in other pages?

I have checked it on two text/html serving sites, and the document.cookie works just fine with such documents.
(Reporter)

Comment 5

10 years ago
Within the test-case XHTML-document that I have been preparing it works.
Now I just have to figure out where is the difference...
I am sorry.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → INVALID
(Reporter)

Comment 6

10 years ago
In fact it now works even in the same document that did not work yesterday.
Nevermind...
I do apologize again.

Comment 7

10 years ago
no problem. ;)
You need to log in before you can comment on or make changes to this bug.