Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

bindle push-invoice gets status 400 #344

@FrankYang0529

Description

@FrankYang0529

Follow Using Bindle example,, we can't get the expected result.

  1. Setup bindle-server
# Build
make build

# Create signing key
BINDLE_TEMP=$(mktemp -d)
./target/debug/bindle keys create "VishnuJin<me@example.com>" -f $BINDLE_TEMP/secret_keys.toml

# Run server
export RUST_LOG=error,warp=info,bindle=debug
./target/debug/bindle-server --unauthenticated -d $BINDLE_TEMP --signing-keys $BINDLE_TEMP/secret_keys.toml
  1. Use bindle to push an invoice
$ cat <<EOF > invoice.toml
bindleVersion = "1.0.0"

[bindle]
name = "mybindle"
version = "0.1.0"
authors = ["Matt Butcher <matt.butcher@microsoft.com>"]
description = "My first bindle"

[annotations]
myname = "myvalue"
EOF

export BINDLE_URL="http://localhost:8080/v1/"
./target/debug/bindle sign-invoice -o signed-invoice.toml invoice.toml
./target/debug/bindle push-invoice signed-invoice.toml

We will get error logs in the server like following:

2022-09-15T16:24:06.167539Z  INFO request{method=POST path=/v1/_i version=HTTP/1.1 remote.addr=127.0.0.1:61085}: warp::filters::trace: processing request
2022-09-15T16:24:06.200357Z DEBUG request{method=POST path=/v1/_i version=HTTP/1.1 remote.addr=127.0.0.1:61085}: bindle::server::reply: Parsed accept header into list accept_value=application/toml accept_items=["application/toml"]
2022-09-15T16:24:06.201014Z DEBUG request{method=POST path=/v1/_i version=HTTP/1.1 remote.addr=127.0.0.1:61085}: bindle::server::reply: Selected a best-fit MIME best_fit=application/toml
2022-09-15T16:24:06.202589Z  INFO request{method=POST path=/v1/_i version=HTTP/1.1 remote.addr=127.0.0.1:61085}: warp::filters::trace: finished processing with success status=400

ref: #343

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions