Skip to content

net/url: When I used net/url package ,I met a Bug. #41491

@sober-wang

Description

@sober-wang

What version of Go are you using (go version)?

$ go version v1.13.5

Does this issue reproduce with the latest release?

Maybe ,this issue reproduce with the latest release.

What did you do?

package main

import (
	"fmt"
	"log"
	"net/url"
)

func main() {
	fmt.Println("vim-go")
	u := "http://admin:FSdf%30g52@192.168.1.1:8888"
	log.Println(u)
	uri, err := url.Parse(u)
	if err != nil {
		fmt.Println("=>", err)
	}
	log.Println(uri)
	URL := uri.String()
	log.Println(URL)
}

If you run this code , the %3 will miss
image

What did you expect to see?

I hope the net/url can clear distinction the correct URI, don't miss something.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions