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

IE11 prompts user to download done.json #5

Open
zbillings opened this issue Oct 7, 2015 · 2 comments
Open

IE11 prompts user to download done.json #5

zbillings opened this issue Oct 7, 2015 · 2 comments

Comments

@zbillings
Copy link

Lines 25-29 in iisnode-meteor-ad-sso/index.js

Current:

app.get("/" + config.basePath + "/done", function (req, res) {
    res.writeHead(200, { 'Content-Type' : 'application/json' });
    res.end('[]');
    if (config.debug) console.error('Completed authentication');
  });

When I browse to my Meteor app in IE11 I am prompted to download done.json.

When I make the following change...

app.get("/" + config.basePath + "/done", function (req, res) {
    //res.writeHead(200, { 'Content-Type' : 'application/json' });
    //res.end('[]');
    res.writeHead(200);
    res.end();
    if (config.debug) console.error('Completed authentication');
  });

everything works fine in all browsers I've tested (Chrome, FF, IE11) and IE no longer prompts for download.

I see you made a change to this file back in February stating that you wanted to return valid JSON, so maybe this issue is incorrect or misguided.

@emgee3
Copy link
Owner

emgee3 commented Oct 7, 2015

Would it be possible to try a fresh Windows install and look around if there's some sort of IE zone setting that's weird? Your fix above (while it shouldn't really a problem) kind of rubs me the wrong way. If I correctly set the MIME-type, why it would prompt to save the JSON is pretty idiotic. I tried to do a little testing here, but IE11 reported JSON as undefined, despite a correctly set html5 doctype.

Anyway, ranting aside, if this isn't an isolated incident, we can fix it as above, but in theory it should work as it is.

@zbillings
Copy link
Author

I'll see what I can do with testing on a fresh install and I'll double check my security settings.

It does seem idiotic that IE prompts while all other browsers I've tested handle the original code just fine. However, it is IE so...

On a more positive note, I wanted to say thank you for creating and sharing this utility. It has been extremely helpful and very easy to implement and use.

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