Skip to content

Commit 74871aa

Browse files
committed
Use http as the default scheme, closes #27
1 parent b3dc386 commit 74871aa

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ adheres to [Semantic Versioning][semver].
1717

1818
### Changed
1919

20+
* Use `http` as the default scheme. ([#27][#27])
2021
* Updated dependencies, now using newer versions of quic-go, dnsproxy, cfcrypto.
2122

23+
[#27]: https://github.com/ameshkov/gocurl/issues/27
24+
2225
[unreleased]: https://github.com/ameshkov/gocurl/compare/v1.4.2...HEAD
2326

2427
## [1.4.2] - 2024-03-31

internal/config/config.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ func ParseConfig() (cfg *Config, err error) {
180180
return nil, fmt.Errorf("invalid URL specified %s: %w", opts.URL, err)
181181
}
182182

183+
if cfg.RequestURL.Scheme == "" {
184+
// Use http scheme by default.
185+
cfg.RequestURL.Scheme = "http"
186+
}
187+
183188
if opts.ProxyURL != "" {
184189
cfg.ProxyURL, err = url.Parse(opts.ProxyURL)
185190
if err != nil {

0 commit comments

Comments
 (0)