mirror of
https://github.com/projectdiscovery/httpx
synced 2026-06-08 16:50:17 +00:00
fixing example
This commit is contained in:
@@ -3,8 +3,8 @@ package httpx
|
||||
type Proto string
|
||||
|
||||
const (
|
||||
AUTO Proto = "auto"
|
||||
HTTP11 Proto = "http11"
|
||||
HTTP2 Proto = "http2"
|
||||
HTTP3 Proto = "http3"
|
||||
UNKNOWN Proto = ""
|
||||
HTTP11 Proto = "http11"
|
||||
HTTP2 Proto = "http2"
|
||||
HTTP3 Proto = "http3"
|
||||
)
|
||||
|
||||
+2
-2
@@ -420,7 +420,7 @@ func ParseOptions() *Options {
|
||||
flagSet.BoolVar(&options.chainInStdout, "include-chain", false, "include redirect http chain in JSON output (-json only)"),
|
||||
flagSet.BoolVar(&options.StoreChain, "store-chain", false, "include http redirect chain in responses (-sr only)"),
|
||||
flagSet.BoolVarP(&options.StoreVisionReconClusters, "store-vision-recon-cluster", "svrc", false, "include visual recon clusters (-ss and -sr only)"),
|
||||
flagSet.StringVarP(&options.Protocol, "protocol", "pr", "auto", "protocol to use (auto, http11)"),
|
||||
flagSet.StringVarP(&options.Protocol, "protocol", "pr", "", "protocol to use (unknown, http11)"),
|
||||
)
|
||||
|
||||
flagSet.CreateGroup("configs", "Configurations",
|
||||
@@ -672,7 +672,7 @@ func (options *Options) ValidateOptions() error {
|
||||
options.OutputCDN = "true"
|
||||
}
|
||||
|
||||
if !stringsutil.EqualFoldAny(options.Protocol, string(httpx.AUTO), string(httpx.HTTP11)) {
|
||||
if !stringsutil.EqualFoldAny(options.Protocol, string(httpx.UNKNOWN), string(httpx.HTTP11)) {
|
||||
return fmt.Errorf("invalid protocol: %s", options.Protocol)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user