On Thu, Apr 30, 2020 at 10:05 AM Vivek <vickywind...@gmail.com> wrote:

> I am trying to parse  a url similar to "ftp://
> user:pass@192.168.0.1/path/file%ver3.txt" using `net/url` Parse function
> but I am getting a error
>
> `parse "ftp://user:pass@192.168.0.1/path/file%ver3.txt": invalid URL
> escape "%ve"`
>

That is not a valid URL. The Python urllib.parse module explicitly ignores
invalid percent encodings and treats the % in that case as a literal
percent-sign. That URL should be written as `.../file%25ver3.txt`; assuming
you want a literal percent-sign in the path.

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD-oZA5x6Sjd3S-%2BKGJTbinb%3DoxrevaW3%3DcbB6cwoxKAMQ%40mail.gmail.com.

Reply via email to