Comments (7)
How would I go about changing the connection type?
from node-oauth.
Change "close" to "keep-alive" on lines 28, and 46 in lib/oauth.js. Here's the fix: https://gist.github.com/1063403
from node-oauth.
I saw this same error. Spiceapps's fix worked for Google. Didn't test with any other provider.
Thanks, Spiceapps.
from node-oauth.
I am experiencing this as well trying to access Blogger's APIs. A proper bugfix release would be much appreciated! We'd rather not have to maintain a fork ourselves.
from node-oauth.
I don't actually think a patch is needed. It's a configurable setting when you create a new OAuth.
var oa = new OAuth { requestUrl,
accessUrl,
consumerKey,
consumerSecret,
version,
authorize_callback,
signatureMethod,
nonceSize,
{"Accept" : "/",
"Connection" : "keep-alive",
"User-Agent" : "Node authentication"});
from node-oauth.
Fwiw, you can configure around this as @danmactough says... also I believe it to be an issue with the current versions of node.js are you sure it isn't an example of : nodejs/node-v0.x-archive#728 ? (Closing for now.. will re-open it if required :) )
from node-oauth.
I was able to configure around Google not sending end() by passing { "Connection" : "keep-alive" } as the last argument to the OAuth client creation function-- using the Accept header as @danmactough posted resulted in an HTTP 406 when communicating with the Blogger endpoints.
from node-oauth.
Related Issues (20)
- Error: socket hang up
- Receiving error: "status":342 HOT 2
- can i use `code` in access token url ?
- Project is active? HOT 5
- Default Accept header to JSON HOT 3
- Custom Header for Binary Request (Twitter Media Download)
- posting multipart form data with oauth HOT 3
- etsy oauth image upload HOT 2
- add a proxy usage
- Login with twitter id:pass
- Oath
- Autho2
- post method throw error HOT 5
- twitter-example error HOT 1
- OAuth `authHeader` method not creating a valid signature for POST requests with url encoded form parameters HOT 3
- 'self signed certificate in certificate chain' SELF_SIGNED_CERT_IN_CHAIN
- Getting ECONNRESET in passport-google-oauth20 strategy
- do not assume utf-8 for GET requests HOT 1
- Invalid character in header content ["clean"] - because of using `for...in`? HOT 1
- Query string is altered when there's multiple entries with the same key
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-oauth.