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

net/http: allows empty header names #11205

dvyukov opened this issue Jun 13, 2015 · 1 comment


None yet
5 participants
Copy link

commented Jun 13, 2015

The following program:

package main

import (

func main() {
    data := []byte("GET / HTTP/0.0\n:v\n\n")
    r, err := http.ReadRequest(bufio.NewReader(bytes.NewReader(data)))
    if err != nil {
    fmt.Printf("%q\n", r.Header.Get(""))



As per RFC 7230 field-name is a token, tokens consist of one or more chars.

go version devel +a1fe3b5 Sat Jun 13 04:33:26 2015 +0000 linux/amd64

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Jun 13, 2015


This comment has been minimized.

Copy link

commented Jun 18, 2015

CL mentions this issue.

@bradfitz bradfitz closed this in 626188d Jun 22, 2015

@mikioh mikioh modified the milestones: Go1.5, Go1.6 Jun 22, 2015

@golang golang locked and limited conversation to collaborators Jun 25, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.