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

proposal: net/http: add MethodSearch constant for HTTP SEARCH method #29894

Open
arthurkushman opened this issue Jan 23, 2019 · 3 comments

Comments

@arthurkushman
Copy link

commented Jan 23, 2019

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

$ go version
go version go1.11.4 darwin/amd64

What operating system and processor architecture are you using (go env)?

MacOS/amd64

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/arthur/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/arthur/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.11.4/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.11.4/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/0m/qqy9wr_n4l5_2zhm0fhnp9jw0000gp/T/go-build084923408=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Added a MethodSearch = "SEARCH" to http/net/method.go, to let developers conveniently use public API, in this particular case constant for http requests in web-apps.

References to RFCs and examples:
https://tools.ietf.org/id/draft-snell-search-method-00.html#search
https://tools.ietf.org/id/draft-snell-search-method-00.html#rfc.section.4.2

@bradfitz

This comment has been minimized.

Copy link
Member

commented Jan 23, 2019

My usual question: what about SPACEJUMP?

Where do we draw the line?

@bradfitz bradfitz changed the title In accordance with RFC7230/7231 there should be support for SEARCH http method proposal: net/http: add MethodSearch constant for HTTP SEARCH method Jan 23, 2019

@gopherbot gopherbot added this to the Proposal milestone Jan 23, 2019

@gopherbot gopherbot added the Proposal label Jan 23, 2019

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jan 23, 2019

Let's leave net/http alone until we redo the client API wholesale.
See #22841 (comment) for the same sentiment for Put/Patch methods.

@rsc rsc added the Proposal-Hold label Jan 23, 2019

@arthurkushman

This comment has been minimized.

Copy link
Author

commented Jan 24, 2019

@bradfitz from my experience the line always between proved theories with practical needs and other crazy things. So, here we have method SEARCH that, practically, can be used only for requests that query search results e.g.: full-text search and isolate those from overloaded GET, logically separating them.

@rsc Go-team opened code for open-source community, now it seems like: "let`s leave code alone" - do not touch API, until we redo and then put those methods our-selfs into the code. I saw already, that guys from formal go-team just rework code a little and put it as their own, although the pull requests left non-merged and then closed, I would never do things like that to contributors in my projects, because it is straight bullying and misusage of power.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.