Skip to content

feat: add option to disable redirects#109

Merged
11eshaannegi merged 10 commits into
mainfrom
feat/disable-redirects
Mar 30, 2026
Merged

feat: add option to disable redirects#109
11eshaannegi merged 10 commits into
mainfrom
feat/disable-redirects

Conversation

@11eshaannegi
Copy link
Copy Markdown
Contributor

Summary

Adds support for disabling HTTP redirects in goperf.

What’s changed

  • added DisableRedirects to http client config
  • updated client to not follow redirects when this is true
  • passed the flag through RunConfig and CLI (--disable-redirects)
  • handled it in config file + merge logic
  • added some tests around this

Usage

goperf --disable-redirects

Notes

  • default behavior is unchanged (redirects are followed)
  • when enabled, it returns redirect responses (like 301/302) instead of following them

@11eshaannegi 11eshaannegi force-pushed the feat/disable-redirects branch from 818f51b to 88aee82 Compare March 26, 2026 10:16
Comment thread internal/httpclient/client.go
Comment thread internal/httpclient/client_test.go Outdated
Comment thread internal/httpclient/client_test.go Outdated
@rahul-infra
Copy link
Copy Markdown
Collaborator

Approving this PR for now.
Things to add:
Add a test in cmd/run_integration_test.go that calls NewCmd, passes --disable-redirects, and verifies behavior end-to-end.

@11eshaannegi 11eshaannegi merged commit 87f7e36 into main Mar 30, 2026
5 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants