Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail in Firefox 18 beta #162

Closed
conradz opened this issue Dec 13, 2012 · 4 comments
Closed

Tests fail in Firefox 18 beta #162

conradz opened this issue Dec 13, 2012 · 4 comments

Comments

@conradz
Copy link

conradz commented Dec 13, 2012

I'm running the tests in Firefox 18 beta on Windows. The tests consistently fail in the simple HEAD test at line 26 in test.request.js with the message Error: res.text.

For some reason res.text is undefined in Firefox 18 beta. I tried the tests in Chrome and IE10 on the same computer and they all work.

EDIT: res.text is supposed to be undefined, see comment below.

@conradz
Copy link
Author

conradz commented Dec 13, 2012

Actually res.text is supposed to be undefined, but it appears that in Firefox res.text is a string containing the source of test.request.js. In the built-in Firefox JS debugger it shows [longString undefined] as the value of res.text, but printing to the console and also Firebug shows that typeof res.text === "string" and it is a string containing the source code.

@conradz
Copy link
Author

conradz commented Dec 13, 2012

So it appears that the server is sending back the file contents that the test is requesting, even when using the HEAD request. Most browsers will discard the body when using HEAD, but Firefox 18 beta is not. It is preserving the response body even for HEAD requests. The tests appear to be expecting the browser to discard the body of a HEAD request.

Should superagent force the response text to be empty on HEAD requests, or should the tests be changed to allow response text? The only way to make it be the same cross-browser seems to be to clear the response text, since other browsers won't give the response text.

@tj
Copy link
Contributor

tj commented Jan 3, 2013

oh weird, that's messed, FF is always doing weird shit like this, node should be dropping the response body though I'll have a look thanks for the report

@tj
Copy link
Contributor

tj commented Jan 3, 2013

im guessing that since test.request.js is loaded FF is serving it straight from cache or something

@tj tj closed this as completed in 0ee3e45 Jan 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants