Comments (16)
I'm getting this same error here. Taking a quick look at the source code, I think it's missing an "Accept-Encoding" or "Content-Encoding" Headers (set to utf-8) in the webResource object in the insertEntity function of TableService. It's just a guess. I'll run some tests here and see if I can figure it out.
from azure-sdk-for-node.
I've been trying to find the problem but until now, no success. I've traced the request data (including headers and content), and everything seems to be ok.
During my tests, I found out that when inserting items in batch when there's some unicode values, it says the entities were inserted, when in fact, they weren't. I'll keep trying to find what's wrong.
from azure-sdk-for-node.
Could you provide a test case which reproduces the problem reliably?
from azure-sdk-for-node.
I've created a gist with a code example you can use to reproduce: https://gist.github.com/1672240
from azure-sdk-for-node.
Awesome, I'll give it a go.
from azure-sdk-for-node.
Great! I'll keep trying to find something here!
from azure-sdk-for-node.
Alright, I've found the issue. Now I just need to find a place to charge my laptop before figuring out how to patch.
from azure-sdk-for-node.
Right, the issue is the content length set for all the xml data. It should be byte length, not char length.
See all the xml sending methods in tableservice.js. They will be setting it such as:
webResource.addOptionalHeader(HeaderConstants.CONTENT_LENGTH, entityXmlDescriptor.length);
The fix is to replace all of these with:
webResource.addOptionalHeader(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(entityXmlDescriptor, 'utf8'));
from azure-sdk-for-node.
I'd be happy to send a pullreq, but will have to find a power source first.
from azure-sdk-for-node.
Feel free to try my fork, at https://github.com/einaros/azure-sdk-for-node .. it should be fixed there. I haven't run the test cases yet, though, so no pullreq.
from azure-sdk-for-node.
Great stuff @einaros ! Your fix is absolutely correct. When you can just generate the pul request and ill accept it.
Thanks
Andre
from azure-sdk-for-node.
Awesome @einaros ! It totally makes sense.
Thank you so much!
Breno
from azure-sdk-for-node.
I've been looking at the source code, and I think this problem seems to be present in some other modules as well, such as the QueueService and BlobService.
from azure-sdk-for-node.
It is. I've started writing test cases and fixes for the other pieces too.
from azure-sdk-for-node.
There we go. Updated the pullreq.
from azure-sdk-for-node.
This is now fixed in the dev branch.
from azure-sdk-for-node.
Related Issues (20)
- Vulnerability in Validator JS HOT 1
- ReDoS vulnerability in validator js HOT 1
- Critical Component Governance Vulnerability in json-schema 0.2.3 in ms-rest HOT 2
- I want to generate a video meeting link. Does this lib supports video calling? HOT 1
- Vulnerability - Json Schema Prototype Pollution HOT 2
- Vulnerability - Inefficient Regular Expression Complexity in validator.js HOT 1
- ChainAlert: new npm maintainer has published version 2.5.5 of package ms-rest HOT 2
- CDK for infrastructure as code HOT 6
- Vulnerability - Inefficient Regular Expression Complexity in validator.js - still apparent in azure-sb latest version
- Cannot verify a JWT token via EC Key HOT 3
- data-model-dependency-telemetry does not support type: "ServiceBus" HOT 1
- npm audit reported about a vulnerability in "async" dependency HOT 2
- How to extend message lock duration in nodejs? HOT 2
- Pass --allow-no-subscriptions to loginWithServicePrincipalSecret HOT 5
- This repo is missing important files
- error HOT 2
- This repo is missing a license file HOT 1
- Local git deployment does not synchronously delete files (Linux webapp) HOT 5
- Local git deployment does not synchronously delete files (Linux webapp) HOT 1
- Deprecated npm request package used HOT 8
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 azure-sdk-for-node.