auth.getMobileSession should use HTTPS#14
Open
maxkueng wants to merge 2 commits intojammus:masterfrom
Open
Conversation
Added auth.getMobileSession to WRITE_METHODS and SECURE_METHODS. Fixed undefined method variable in requiresSignature and isWriteRequest
Contributor
Author
|
Hi James I thought this should do the trick but it doesn't. Now the request returns a non-JSON (i.e. HTML) response saying the document has permanently moved to Cheers PS: How to convert a GitHub issue into a pull-request - pretty cool The response body: <head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/0.7.65</center>
</body>
</html>The response headers: { server: 'nginx/0.7.65',
date: 'Sat, 19 Jan 2013 21:05:03 GMT',
'content-type': 'text/html',
'content-length': '185',
location: 'https://localhost:445/2.0/',
connection: 'keep-alive' }The options for { host: 'ws.audioscrobbler.com',
port: 443,
path: '/2.0',
method: 'POST',
headers:
{ 'User-Agent': 'lastfm-node',
'Content-Length': 162,
'Content-Type': 'application/x-www-form-urlencoded' } }And the body for the POST request: |
Contributor
Author
There was a problem hiding this comment.
method was undefined
Contributor
Author
|
I think I broke something. Will have to go over it again. |
Owner
|
Thanks for the heads up, Max. I'll have a look and see if I can see what's happening too. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
According to the documentation, the
auth.getMobileSessionmethod will not work over plain HTTP. HTTPS should be used instead.The returned error object looks like this: