Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

sign out is borked #2940

Closed
chadwhitacre opened this issue Nov 16, 2014 · 9 comments
Closed

sign out is borked #2940

chadwhitacre opened this issue Nov 16, 2014 · 9 comments

Comments

@chadwhitacre
Copy link
Contributor

I'm seeing a 415 in the console. Possibly related to #398?

@chadwhitacre chadwhitacre mentioned this issue Nov 16, 2014
39 tasks
@techtonik
Copy link
Contributor

Is there any traceback info?

@chadwhitacre
Copy link
Contributor Author

Is there any traceback info?

Nope. We only get tracebacks for 500s.

@chadwhitacre
Copy link
Contributor Author

I'm able to reproduce the issue locally.

@chadwhitacre
Copy link
Contributor Author

@chadwhitacre
Copy link
Contributor Author

The issue is that when the body of an $.ajax request is blank, jQuery doesn't set a Content-Type, so we fall through to the default_parser on the server side.

gratipay.com/js/gratipay.js

Lines 108 to 117 in dae1494

jQuery.ajax({
url: '/sign-out.html',
type: 'POST',
success: function() {
window.location.href = window.location.href;
},
error: function() {
Gratipay.notification('Failed to sign out', 'error');
}
});

@chadwhitacre
Copy link
Contributor Author

P.S. I successfully used algorithm.debug here. :-)

@techtonik
Copy link
Contributor

Read up on algorithm.debug. Much better interface that can be memorized (unlike pdb calls). It is also convenient to wrap function instead of hacking function body.

The only thing that I don't like is the pdb itself. It needs to be evolved. =)

@chadwhitacre
Copy link
Contributor Author

@techtonik Have you seen ipdb?

@techtonik
Copy link
Contributor

Both ipdb and pdb need documentation to use, but ipdb is at least usable after you've read the docs. But the killer feature that caught me today was import debug. =)

@chadwhitacre chadwhitacre mentioned this issue Dec 2, 2014
35 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants