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

[BUG] iroha_client 401 HTTP Response after executing get_config_value method #4177

Closed
Stukalov-A-M opened this issue Dec 26, 2023 · 2 comments
Assignees
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST

Comments

@Stukalov-A-M
Copy link
Contributor

Stukalov-A-M commented Dec 26, 2023

It happens because method doesn't pass Authorization header to the Request builder.
Also we are using both attohttpc and http crates for building HTTP requests, that creates code excessiveness and in some cases ambiguousness.
As an example - building a request through request body check.

pub fn build(self) -> Result<DefaultRequest> {
        self.inner
            .map(|b| DefaultRequest(b.bytes(self.body.map_or_else(Vec::new, |vec| vec))))
    }

For this reason, in the process of the bug fixing, I propose to refactor by removing the attohttpc crate from client and unify all HTTP request building using the http crate only.

@Stukalov-A-M
Copy link
Contributor Author

Discussed with Daniil and Dmitriy that it's not safety to refactor request builder because current design provides a generic property for other request builders like ActixReqBuilder.
So, it was decided to add Authorization header only into "client/get_config()"

Stukalov-A-M added a commit to Stukalov-A-M/iroha that referenced this issue Dec 28, 2023
…'s headers to the requests

Signed-off-by: Stukalov-A-M <stukalov07@gmail.com>
@Stukalov-A-M Stukalov-A-M changed the title [BUG] iroha_client 401 HTTP Response when after executing get_config_value [BUG] iroha_client 401 HTTP Response after executing get_config_value method Dec 28, 2023
Stukalov-A-M added a commit to Stukalov-A-M/iroha that referenced this issue Dec 28, 2023
…'s headers to the requests

Signed-off-by: Stukalov-A-M <stukalov07@gmail.com>
Arjentix pushed a commit to Stukalov-A-M/iroha that referenced this issue Jan 12, 2024
…'s headers to the requests

Signed-off-by: Stukalov-A-M <stukalov07@gmail.com>
Arjentix pushed a commit that referenced this issue Jan 12, 2024
…to the requests

Signed-off-by: Stukalov-A-M <stukalov07@gmail.com>
Asem-Abdelhady pushed a commit to Asem-Abdelhady/iroha that referenced this issue Jan 22, 2024
…'s headers to the requests

Signed-off-by: Stukalov-A-M <stukalov07@gmail.com>
Signed-off-by: Asem-Abdelhady <asemshawkey@gmail.com>
Asem-Abdelhady pushed a commit to Asem-Abdelhady/iroha that referenced this issue Feb 9, 2024
…'s headers to the requests

Signed-off-by: Stukalov-A-M <stukalov07@gmail.com>
@nxsaken
Copy link
Contributor

nxsaken commented Apr 29, 2024

Fixed by #4180.

@nxsaken nxsaken closed this as completed Apr 29, 2024
@nxsaken nxsaken added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

No branches or pull requests

2 participants