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

http: superfluous response.WriteHeader call in topic.go:200 #618

Open
GowthamHN opened this issue Aug 19, 2024 · 0 comments · May be fixed by #619
Open

http: superfluous response.WriteHeader call in topic.go:200 #618

GowthamHN opened this issue Aug 19, 2024 · 0 comments · May be fixed by #619
Labels
bug Something isn't working

Comments

@GowthamHN
Copy link

GowthamHN commented Aug 19, 2024

Describe the bug
Superfluous writeHeader calls are made in the registerBaseHandler function of topic.go file.

http: superfluous response.WriteHeader call from github.com/dapr/go-sdk/service/http.(*Server).registerBaseHandler.func6 (topic.go:200)

To Reproduce
Here's the sample code to reproduce the behavior.

func ActorFactory() actor.ServerContext {
	client, err := dapr.NewClient()
	if err != nil {
		panic(err)
	}
	agent := &BackupStatusMonitoringAgent{
		DaprClient:   client,
		HttpClient:   &http.Client{},
		DaprHttpPort: 3500,
	}

	return agent
}

var appPort = 9001
func main() {
	s := daprd.NewService(fmt.Sprintf(":%v", appPort))
	s.RegisterActorImplFactoryContext(server.ActorFactory)
	if err := s.Start(); err != nil && err != http.ErrServerClosed {
		log.Fatalf("error listenning: %v", err)
	}
}

Expected behavior
The status code headers must be mutually exclusive and not superfluous

@GowthamHN GowthamHN added the bug Something isn't working label Aug 19, 2024
@GowthamHN GowthamHN linked a pull request Aug 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant