Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible error in url.go #30958

Closed
delbertaud opened this issue Mar 20, 2019 · 1 comment
Closed

Possible error in url.go #30958

delbertaud opened this issue Mar 20, 2019 · 1 comment

Comments

@delbertaud
Copy link

go version go1.12 windows/amd64

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\delbe\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\delbe\go
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\delbe\AppData\Local\Temp\go-build263610566=/tmp/go-build -gno-record-gcc-switches

What did you do?

Testing Lorca for Desktop App Development

What did you expect to see?

Web page to be displayed

What did you see instead?

Received an error reported by net\url\url.go
because the url had a space at the end of the string. I feel this is an invalid error as it does not effect the referencing of the end-point.

My fix was to simply trim the url in the function of url.go

func stringContainsCTLByte(s string) bool {
s = strings.TrimSpace(s)
for i := 0; i < len(s); i++ {

@ianlancetaylor
Copy link
Contributor

This is an intentional change mentioned in the 1.12 release notes at https://golang.org/doc/go1.12#net/url .

@golang golang locked and limited conversation to collaborators Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants