Skip to content

Content-Length in POST request not filled #3

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

Closed
pkozak2 opened this issue Mar 7, 2020 · 6 comments
Closed

Content-Length in POST request not filled #3

pkozak2 opened this issue Mar 7, 2020 · 6 comments

Comments

@pkozak2
Copy link

pkozak2 commented Mar 7, 2020

My custom API (.NET Core) returns 411 HTTP Error.

I found that the Content-Length is not filled in request headers.

Current BETA NAMF-2020-23
image

Stable version - NAMF-2019-020:
image

Additionaly I found that used Library probably want to fill Content-Length:
https://github.com./esp8266/Arduino/blob/372a3ec297dfe8501bed1ec4552244695b5e8ced/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp#L673

But, not only I have this issue with this library:
esp8266/Arduino#2678

@pkozak2
Copy link
Author

pkozak2 commented Mar 7, 2020

I tested airrohr firmware which using HTTPClient like new nettigo firmware, and it's working with my API, so there is something wrong with new source.
I will try to find what, but I can't promise

@irukard
Copy link
Contributor

irukard commented Mar 8, 2020

It's simple. Basic auth isn't working yet.

@pkozak2
Copy link
Author

pkozak2 commented Mar 8, 2020

Ok, I will try today.

@netmaniac
Copy link
Contributor

@irukard I'm not sure if this really BasicAuth issue. It works for me with Influx (so it is not a custom API though), in attached traffic auth headers seems to be exact the same. API responds with 411 not 401, so auth is working.
I'll take a look at code I guess we are not adding content-length :)

@netmaniac
Copy link
Contributor

@pkozak2 I have added Content-Length header when sending. As I thought it was lost when converting code.Try with new FW (2020-24). If it won't work for You reopen issue.

@netmaniac netmaniac reopened this Mar 8, 2020
@pkozak2
Copy link
Author

pkozak2 commented Mar 8, 2020

As Ikurad says, authorization header not working for now.

#4 fixes 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

No branches or pull requests

3 participants