-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
[Bug] octocrab::Octocrab::request_installation_auth_token fails with status code 411 #463
Comments
used octocrab version is |
Thank you for your issue! Would you be able to provide your fix as a PR? |
phideg
pushed a commit
to phideg/octocrab
that referenced
this issue
Oct 4, 2023
Fixes issue XAMPPRocky#463. GitHub REST API endpoints, that use the http POST method, seem to require a `CONTENT-LENGTH` header even if the request body is empty. This change addresses the issue either by sending an empty JSON document or by explicitly setting the `CONTENT-LENGTH` header as described in following issue: seanmonstar/reqwest#83
PR is open :) |
XAMPPRocky
pushed a commit
that referenced
this issue
Jan 15, 2024
Fixes issue #463. GitHub REST API endpoints, that use the http POST method, seem to require a `CONTENT-LENGTH` header even if the request body is empty. This change addresses the issue either by sending an empty JSON document or by explicitly setting the `CONTENT-LENGTH` header as described in following issue: seanmonstar/reqwest#83 Co-authored-by: Philipp Degler <philipp.degler@sap.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm writing a GitHub app that fails at following code snippet:
call stack of error is:
The http status code is
StatusCode::LENGTH_REQUIRED
=>(411, LENGTH_REQUIRED, "Length Required");
I figured, that the "bug" is due to the following code line in octocrab/src/lib.rs:1396
If I replace
String::new()
with"{}".to_string()
everything works as expectedThe text was updated successfully, but these errors were encountered: