You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ /c/Go/bin/go.exe version
go version go1.10.2 windows/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
$ /c/Go/bin/go.exe env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Ilya Bakhlin\AppData\Local\go-build
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\Ilya Bakhlin\go
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 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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\ILYABA~1\AppData\Local\Temp\go-build236770806=/tmp/go-build -gno-record-gcc-switches
What did you do?
I've created a simple HTTP POST request with the *http.Client, *http.Request and *url.URL structures. The whole script is represented here.
If you read it, everything should be working, but it's not. I've figured out the problem resides in the *url.URL's Path property - according to the official documentation, whenever the Path is defined, the leading slash (/) is not necessary. But, if you add it in the script, it will work.
What did you expect to see?
{"status":"error","code":-1,"name":"ValidationError","message":"You must specify a key value"}
What did you see instead?
<html><head><title>400 Bad Request</title></head><bodybgcolor="white"><center><h1>400 Bad Request</h1></center><hr><center>nginx/1.12.2</center></body></html>
The text was updated successfully, but these errors were encountered:
ilyabakhlin
changed the title
Problem with the Leading Slash of the url.URL structure's Path Property
url/URL: problem with the leading slash of the Path property
Aug 29, 2018
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?What did you do?
I've created a simple HTTP POST request with the
*http.Client
,*http.Request
and*url.URL
structures. The whole script is represented here.If you read it, everything should be working, but it's not. I've figured out the problem resides in the
*url.URL
'sPath
property - according to the official documentation, whenever thePath
is defined, the leading slash (/
) is not necessary. But, if you add it in the script, it will work.What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: