Does not look like a valid HEAD request. It should be "HEAD / HTTP/1.1"

-Agniva

On Friday, 26 October 2018 00:15:14 UTC+5:30, Swapnil Mhatre wrote:
>
> Hi,
>
> I wanted to check on the forum first before filing an issue. Please see 
> below for the issue I am seeing.
> I used a valid POSTMAN HTTP HEAD request message for my test.
>
>
> ### What version of Go are you using (`go version`)?
> go 1.11
>
> ### Does this issue reproduce with the latest release?
> Don't know
>
> ### What operating system and processor architecture are you using (`go 
> env`)?
>
> GOARCH="amd64"
> GOBIN="~/go/bin"
> GOCACHE="~/Library/Caches/go-build"
> GOEXE=""
> GOFLAGS=""
> GOHOSTARCH="amd64"
> GOHOSTOS="darwin"
> GOOS="darwin"
> GOPATH="~/go"
> GOPROXY=""
> GORACE=""
> GOROOT="/usr/local/Cellar/go/1.11/libexec"
> GOTMPDIR=""
> GOTOOLDIR="/usr/local/Cellar/go/1.11/libexec/pkg/tool/darwin_amd64"
> GCCGO="gccgo"
> CC="clang"
> CXX="clang++"
> CGO_ENABLED="1"
> GOMOD=""
> CGO_CFLAGS="-g -O2"
> CGO_CPPFLAGS=""
> CGO_CXXFLAGS="-g -O2"
> CGO_FFLAGS="-g -O2"
> CGO_LDFLAGS="-g -O2"
> PKG_CONFIG="pkg-config"
> GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments 
> -fmessage-length=0 
> -fdebug-prefix-map=/var/folders/xq/88glw72j3ynbq5_j7x5sgvxnpx11yg/T/go-build829540991=/tmp/go-build
>  
> -gno-record-gcc-switches -fno-common"
>
>
> ### What did you do?
> func main() {
> _, err := http.ReadRequest(bufio.NewReader(strings.NewReader("HEAD  
> HTTP/1.1\nHost: www.google.com\nCache-Control: no-cache\nPostman-Token: 
> 607a1d46-4142-ccf9-b914-68332013ca14")))
> fmt.Println(err.Error())
> }
>
> If possible, provide a recipe for reproducing the error.
> A complete runnable program is good.
> A link on play.golang.org is best.
>
>
> ### What did you expect to see?
> The request string is a valid HEAD request copied from POSTMAN REST client 
> and the HEAD request returns a 200 OK
> You can use any HEAD request message.
>
> ### What did you see instead?
>
> http.ReadRequest failed to parse the request and gave an empty url error
> parse : empty url
>
>
> Thanks,
> Swapnil
>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to