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

coreHTTP Init functions do not handle HTTPClient_InitializeRequestHeaders return code #312

Open
2 tasks done
gfurtadoalmeida opened this issue May 16, 2023 · 0 comments · May be fixed by #313
Open
2 tasks done

coreHTTP Init functions do not handle HTTPClient_InitializeRequestHeaders return code #312

gfurtadoalmeida opened this issue May 16, 2023 · 0 comments · May be fixed by #313

Comments

@gfurtadoalmeida
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Version

1.1.0

Description of the issue

On coreHTTP the following Init functions do not handle the HTTPClient_InitializeRequestHeaders return code, therefore always succeeding, even when it should fail:

This behavior is confusing because those Init functions return success even if HTTPClient_InitializeRequestHeaders cannot write the request headers. Without request headers, Send functions will raise this error:

Parameter check failed: pRequestHeaders->headersLen does not meet minimum the required length. MinimumRequiredLength=16, HeadersLength=0

Expected behavior

The following Init functions should handle the HTTPClient_InitializeRequestHeaders return code, succeeding only when the headers are written:

Steps to reproduce the issue

Call AzureIoTHTTP_RequestSizeInit or AzureIoTHTTP_Init with a header buffer with 10 bytes of size.
It will succeed even though there is not enough space to write the headers.

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@vaavva vaavva linked a pull request May 16, 2023 that will close this issue
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 a pull request may close this issue.

1 participant