Closed Bug 659406 Opened 13 years ago Closed 13 years ago

Access-Control-Expose-Header does not work as expected

Categories

(Core :: Networking, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: shabunc, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1
Build Identifier: 

It is said in documentation, that Access-Control-Expose-Header sets while list of response headers, which one can access from the client side. Nonetheless, it seems to be buggy or doesn't work at all. 

Reproducible: Always

Steps to Reproduce:
1. Create page, which returns "Access-Control-Expose-Header: X-Test"  and "X-Test: DEBUG" response-headers.
2. Create XMLHTTPRequest, send request from one domain to another
3. Try to fetch X-Test header using getHeader method

Actual Results:  
returns null

Expected Results:  
should return DEBUG

First of all, excuse me if I've choosen inappropriate component - I'm new to bug reporting.
Do you have a link to a page showing the problem?

Which Gecko version are you seeing the problem in?

(Note that we do have automated tests running that make sure that Access-Control-Expose-Header works, so it clearly works in at least _some_ cases.)
Oh, wait.  You just mis-spelled it.  The correct spelling is "Access-Control-Expose-Headers" (note the 's' at the end).
Boris, really sorry for my error.
Everything works fine.
By the way, firefox is the only browser correctly supporting this header.
Once again, sorry.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
i guess, there is a typo in documentation - 
https://developer.mozilla.org/en/http_access_control#Access-Control-Expose-Header
Indeed.  Thanks for pointing that out; I fixed the documentation.
You need to log in before you can comment on or make changes to this bug.