MCPcopy
hub / github.com/valyala/fasthttp / TestURIWithQuerystringOverride

Function TestURIWithQuerystringOverride

uri_test.go:559–571  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

557}
558
559func TestURIWithQuerystringOverride(t *testing.T) {
560 t.Parallel()
561
562 var u URI
563 u.SetQueryString("q1=foo&q2=bar")
564 u.QueryArgs().Add("q3", "baz")
565 u.SetQueryString("q1=foo&q2=bar&q4=quux")
566 uriString := string(u.RequestURI())
567
568 if uriString != "/?q1=foo&q2=bar&q4=quux" {
569 t.Fatalf("Expected Querystring to be overridden but was %q ", uriString)
570 }
571}
572
573func TestInvalidUrl(t *testing.T) {
574 url := `https://.çèéà@&~!&:=\\/\"'~<>|+-*()[]{}%$;,¥&&$22|||<>< 4ly8lzjmoNx233AXELDtyaFQiiUH-fd8c-CnXUJVYnGIs4Uwr-bptom5GCnWtsGMQxeM2ZhoKE973eKgs2Sjh6RePnyaLpCi6SiNSLevcMoraARrp88L-SgtKqd-XHAtSI8hiPRiXPQmDIA4BGhSgoc0nfn1PoYuGKKmDcZ04tANRc3iz4aF4-A1UrO8bLHTH7MEJvzx.someqa.fr/A/?&QS_BEGIN<&8{b'Ob=p*f> QS_END`

Callers

nothing calls this directly

Calls 4

SetQueryStringMethod · 0.95
QueryArgsMethod · 0.95
RequestURIMethod · 0.95
AddMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…