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

Updating headers to be string type, conversion handled on worker #79

Merged
merged 2 commits into from
May 31, 2018

Conversation

mhoeger
Copy link
Contributor

@mhoeger mhoeger commented May 31, 2018

Resolves #78

@mhoeger mhoeger requested a review from pragnagopa May 31, 2018 16:49
for (let key in inputHeaders) {
rpcHttpHeaders[key] = toTypedData(inputHeaders[key]);
rpcHttpHeaders[key] = inputHeaders[key].toString();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check for null or empty values inputHeaders[key]?

for (let key in inputHeaders) {
rpcHttpHeaders[key] = toTypedData(inputHeaders[key]);
if (inputHeaders[key] != null) {
rpcHttpHeaders[key] = inputHeaders[key].toString();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add test setting the response headers of different types "stringHeader" , 123

for (let key in inputHeaders) {
rpcHttpHeaders[key] = toTypedData(inputHeaders[key]);
if (inputHeaders[key] != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if(inputHeaders[key]) should take care of undefined , null

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it evaluates to false with a value of 0 though :(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh. Thanks for checking. Add a test for 0 too.

Copy link
Member

@pragnagopa pragnagopa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracking issue to add test: #81

@mhoeger mhoeger merged commit 904acbb into Azure:dev May 31, 2018
mhoeger added a commit that referenced this pull request Jun 5, 2018
* Updating headers to be string type, conversion handled on worker

* Null check (ty pragna!)
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

Successfully merging this pull request may close these issues.

None yet

2 participants