[net/http] HTTP methods check

閲覧: 354 回
最初の未読メッセージにスキップ

c0dxtr3m1st

未読、
2015/08/06 8:47:202015/08/06
To: golang-dev
Hi.

I had an issue today with an extra space in the http method string parameter for [net/http] NewRequest. No error is raised so it's quite misleading.

Maybe we could follow up on https://groups.google.com/d/topic/golang-dev/sRg3-VTaGCo/discussion to be able to rely on a static check, or do this dynamically in [net/http:client.go] (*Client) Do and return an error (but the former LGTM as it doesn't add any overhead).

Regards,
sw.

Brad Fitzpatrick

未読、
2015/08/08 8:02:512015/08/08
To: c0dxtr3m1st、golang-dev
Can you file an issue so we can look at it during Go 1.6?


--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

c0dxtr3m1st

未読、
2015/08/08 9:26:142015/08/08
To: golang-dev、silve...@gmail.com
Absolutely. The related issue is now available at: https://github.com/golang/go/issues/12078.

Brad Fitzpatrick

未読、
2015/08/08 9:28:272015/08/08
To: c0dxtr3m1st、golang-dev

You're proposing a solution in that bug without discussing the problem.

On Aug 8, 2015 4:26 PM, "c0dxtr3m1st" <silve...@gmail.com> wrote:
Absolutely. The related issue is now available at: https://github.com/golang/go/issues/12078.

--

c0dxtr3m1st

未読、
2015/08/08 9:44:492015/08/08
To: golang-dev、silve...@gmail.com
I'm sorry, I was unclear in the first place. There is no bug, the error was on the programmer side by using a wrong method string in call to NewRequest. The proposition is to add the commonly used HTTP method constants to net/http and avoid using strings to refer to these methods, I really add nothing to https://groups.google.com/d/topic/golang-dev/sRg3-VTaGCo/discussion.
全員に返信
投稿者に返信
転送
新着メール 0 件