Skip to content

io.Copy "context canceled" #28

Description

@mikeschinkel

I have been looking at potentially using hyperfox as the base for writing a GitHub API mocking tool, but I cannot even get it to proxy. Here is my command line:

sudo bin/hyperfox -addr 127.0.0.1 -https 9999 \
   --ca-cert /Users/mikeschinkel/Projects/hyperfox/ca/rootCA.crt \
   --ca-key /Users/mikeschinkel/Projects/hyperfox/ca/rootCA.key

When I run a Go program that uses github.com/google/go-github to call Client.Repositories.GetContents() which in turn calls the API I get this output:

2021/02/18 16:44:19 io.Copy: "context canceled"
127.0.0.1:52515 - - [18/Feb/2021:16:44:19 -0500] "CONNECT https://api.github.com:443 HTTP/1.1" 400 161256```

I debugged through it for over an hour but still cannot figure out what I am doing wrong.

BTW, I implemented a proxy in Go based on this code and it worked fine — though I was not able to inspect the information returned which is why I looked at hyperfox — so I know that the GET request by github.com/google/go-github works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions