Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(775)

Issue 6868095: code review 6868095: net/http, net/url: permit Request-URI "*" (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by bradfitz
Modified:
11 years, 5 months ago
Reviewers:
CC:
rsc, golang-dev
Visibility:
Public.

Description

net/http, net/url: permit Request-URI "*" Also, implement a global OPTIONS * handler, like Apache. Permit sending "*" requests to handlers, but not path-based (ServeMux) handlers. That means people can go out of their way to support SSDP or SIP or whatever, but most users will be unaffected. See RFC 2616 Section 5.1.2 (Request-URI) See RFC 2616 Section 9.2 (OPTIONS) Fixes issue 3692

Patch Set 1 #

Patch Set 2 : diff -r a7fe0ec318c1 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r a7fe0ec318c1 https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 4 : diff -r 11d696585699 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 240812376302 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -2 lines) Patch
M src/pkg/net/http/readrequest_test.go View 1 1 chunk +48 lines, -0 lines 0 comments Download
M src/pkg/net/http/serve_test.go View 1 2 3 1 chunk +52 lines, -0 lines 0 comments Download
M src/pkg/net/http/server.go View 1 2 3 3 chunks +24 lines, -0 lines 0 comments Download
M src/pkg/net/url/url.go View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/pkg/net/url/url_test.go View 1 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 6
bradfitz
Hello rsc@golang.org, golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 5 months ago (2012-12-10 19:48:08 UTC) #1
rsc
https://codereview.appspot.com/6868095/diff/3001/src/pkg/net/http/server.go File src/pkg/net/http/server.go (right): https://codereview.appspot.com/6868095/diff/3001/src/pkg/net/http/server.go#newcode776 src/pkg/net/http/server.go:776: } else if _, ok := handler.(*ServeMux); ok { ...
11 years, 5 months ago (2012-12-11 16:16:45 UTC) #2
bradfitz
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 5 months ago (2012-12-11 16:58:16 UTC) #3
bradfitz
Done. I also added some DoS-prevention I forgot about earlier, and also added a new ...
11 years, 5 months ago (2012-12-11 16:58:44 UTC) #4
rsc
LGTM
11 years, 5 months ago (2012-12-11 17:01:55 UTC) #5
bradfitz
11 years, 5 months ago (2012-12-11 17:07:32 UTC) #6
*** Submitted as https://code.google.com/p/go/source/detail?r=3d0bfd549c48 ***

net/http, net/url: permit Request-URI "*"

Also, implement a global OPTIONS * handler, like Apache.

Permit sending "*" requests to handlers, but not path-based
(ServeMux) handlers.  That means people can go out of their
way to support SSDP or SIP or whatever, but most users will be
unaffected.

See RFC 2616 Section 5.1.2 (Request-URI)
See RFC 2616 Section 9.2 (OPTIONS)

Fixes issue 3692

R=rsc
CC=golang-dev
https://codereview.appspot.com/6868095
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b