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

io.Copy "context canceled" #28

Open
mikeschinkel opened this issue Feb 18, 2021 · 0 comments
Open

io.Copy "context canceled" #28

mikeschinkel opened this issue Feb 18, 2021 · 0 comments

Comments

@mikeschinkel
Copy link

mikeschinkel commented Feb 18, 2021

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.

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

1 participant