Skip to content

Commit 1556c59

Browse files
committed
docs: replace refs of the I-D by the RFC
1 parent c51af0e commit 1556c59

File tree

17 files changed

+41
-41
lines changed

17 files changed

+41
-41
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# httpsfv: Structured Field Values for HTTP in Go
22

3-
This [Go (golang)](https://golang.org) library implements parsing and serialization for [Structured Field Values for HTTP](https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html).
3+
This [Go (golang)](https://golang.org) library implements parsing and serialization for [Structured Field Values for HTTP (RFC 8941)](https://httpwg.org/specs/rfc8941.html).
44

55
[![PkgGoDev](https://pkg.go.dev/badge/github.com/dunglas/httpsfv)](https://pkg.go.dev/github.com/dunglas/httpsfv)
66
![CI](https://github.com/dunglas/httpsfv/workflows/CI/badge.svg)
@@ -9,7 +9,7 @@ This [Go (golang)](https://golang.org) library implements parsing and serializat
99

1010
## Features
1111

12-
* Implements the latest version (19) of the Internet-Draft
12+
* Fully implemented the RFC
1313
* Compliant with [the official test suite](https://github.com/httpwg/structured-field-tests)
1414
* Unit tested
1515
* Strongly-typed

bareitem.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var ErrInvalidBareItem = errors.New(
1313
)
1414

1515
// assertBareItem asserts that v is a valid bare item
16-
// according to https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#item.
16+
// according to https://httpwg.org/specs/rfc8941.html#item.
1717
//
1818
// v can be either:
1919
//
@@ -48,7 +48,7 @@ func assertBareItem(v interface{}) {
4848
}
4949

5050
// marshalBareItem serializes as defined in
51-
// https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#ser-bare-item.
51+
// https://httpwg.org/specs/rfc8941.html#ser-bare-item.
5252
func marshalBareItem(b *strings.Builder, v interface{}) error {
5353
switch v := v.(type) {
5454
case bool:
@@ -74,7 +74,7 @@ func marshalBareItem(b *strings.Builder, v interface{}) error {
7474
}
7575

7676
// parseBareItem parses as defined in
77-
// https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#parse-bare-item.
77+
// https://httpwg.org/specs/rfc8941.html#parse-bare-item.
7878
func parseBareItem(s *scanner) (interface{}, error) {
7979
if s.eof() {
8080
return nil, &UnmarshalError{s.off, ErrUnexpectedEndOfString}

binary.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
var ErrInvalidBinaryFormat = errors.New("invalid binary format")
1111

1212
// marshalBinary serializes as defined in
13-
// https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#ser-binary.
13+
// https://httpwg.org/specs/rfc8941.html#ser-binary.
1414
func marshalBinary(b *strings.Builder, bs []byte) error {
1515
if err := b.WriteByte(':'); err != nil {
1616
return err
@@ -27,7 +27,7 @@ func marshalBinary(b *strings.Builder, bs []byte) error {
2727
}
2828

2929
// parseBinary parses as defined in
30-
// https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#parse-binary.
30+
// https://httpwg.org/specs/rfc8941.html#parse-binary.
3131
func parseBinary(s *scanner) ([]byte, error) {
3232
if s.eof() || s.data[s.off] != ':' {
3333
return nil, &UnmarshalError{s.off, ErrInvalidBinaryFormat}

boolean.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
var ErrInvalidBooleanFormat = errors.New("invalid boolean format")
1010

1111
// marshalBoolean serializes as defined in
12-
// https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#ser-boolean.
12+
// https://httpwg.org/specs/rfc8941.html#ser-boolean.
1313
func marshalBoolean(bd io.StringWriter, b bool) error {
1414
if b {
1515
_, err := bd.WriteString("?1")
@@ -23,7 +23,7 @@ func marshalBoolean(bd io.StringWriter, b bool) error {
2323
}
2424

2525
// parseBoolean parses as defined in
26-
// https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#parse-boolean.
26+
// https://httpwg.org/specs/rfc8941.html#parse-boolean.
2727
func parseBoolean(s *scanner) (bool, error) {
2828
if s.eof() || s.data[s.off] != '?' {
2929
return false, &UnmarshalError{s.off, ErrInvalidBooleanFormat}

decimal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const maxDecDigit = 3
1313
var ErrInvalidDecimal = errors.New("the integer portion is larger than 12 digits: invalid decimal")
1414

1515
// marshalDecimal serializes as defined in
16-
// https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#ser-decimal.
16+
// https://httpwg.org/specs/rfc8941.html#ser-decimal.
1717
//
1818
// TODO(dunglas): add support for decimal float type when one will be available
1919
// (https://github.com/golang/go/issues/19787)

dictionary.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
// Dictionary is an ordered map of name-value pairs.
9-
// See https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#dictionary
9+
// See https://httpwg.org/specs/rfc8941.html#dictionary
1010
// Values can be:
1111
// * Item (Section 3.3.)
1212
// * Inner List (Section 3.1.1.)
@@ -101,7 +101,7 @@ func (d *Dictionary) marshalSFV(b *strings.Builder) error {
101101
}
102102

103103
// UnmarshalDictionary parses a dictionary as defined in
104-
// https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#parse-dictionary.
104+
// https://httpwg.org/specs/rfc8941.html#parse-dictionary.
105105
func UnmarshalDictionary(v []string) (*Dictionary, error) {
106106
s := &scanner{
107107
data: strings.Join(v, ","),

encode.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Package httpsfv implements serializing and parsing
2-
// of Structured Field Values for HTTP as defined in the draft-ietf-httpbis-header-structure Internet-Draft.
2+
// of Structured Field Values for HTTP as defined in RFC 8941.
33
//
44
// Structured Field Values are either lists, dictionaries or items. Dedicated types are provided for all of them.
55
// Dedicated types are also used for tokens, parameters and inner lists.
@@ -11,7 +11,7 @@
1111
// byte[], for byte sequences
1212
// bool, for booleans
1313
//
14-
// The specification is available at https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html.
14+
// The specification is available at https://httpwg.org/specs/rfc8941.html.
1515
package httpsfv
1616

1717
import (
@@ -29,7 +29,7 @@ type StructuredFieldValue interface {
2929
}
3030

3131
// Marshal returns the HTTP Structured Value serialization of v
32-
// as defined in https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#text-serialize.
32+
// as defined in https://httpwg.org/specs/rfc8941.html#text-serialize.
3333
//
3434
// v must be a List, a Dictionary or an Item.
3535
func Marshal(v StructuredFieldValue) (string, error) {

innerlist.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
var ErrInvalidInnerListFormat = errors.New("invalid inner list format")
1010

1111
// InnerList represents an inner list as defined in
12-
// https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#inner-list.
12+
// https://httpwg.org/specs/rfc8941.html#inner-list.
1313
type InnerList struct {
1414
Items []Item
1515
Params *Params
@@ -19,7 +19,7 @@ func (il InnerList) member() {
1919
}
2020

2121
// marshalSFV serializes as defined in
22-
// https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#ser-innerlist.
22+
// https://httpwg.org/specs/rfc8941.html#ser-innerlist.
2323
func (il InnerList) marshalSFV(b *strings.Builder) error {
2424
if err := b.WriteByte('('); err != nil {
2525
return err
@@ -46,7 +46,7 @@ func (il InnerList) marshalSFV(b *strings.Builder) error {
4646
}
4747

4848
// parseInnerList parses as defined in
49-
// https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#parse-item-or-list.
49+
// https://httpwg.org/specs/rfc8941.html#parse-item-or-list.
5050
func parseInnerList(s *scanner) (InnerList, error) {
5151
if s.eof() || s.data[s.off] != '(' {
5252
return InnerList{}, &UnmarshalError{s.off, ErrInvalidInnerListFormat}

integer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323
)
2424

2525
// marshalInteger serialized as defined in
26-
// https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#integer.
26+
// https://httpwg.org/specs/rfc8941.html#integer.
2727
func marshalInteger(b io.StringWriter, i int64) error {
2828
if i < -999999999999999 || i > 999999999999999 {
2929
return ErrNumberOutOfRange
@@ -35,7 +35,7 @@ func marshalInteger(b io.StringWriter, i int64) error {
3535
}
3636

3737
// parseNumber parses as defined in
38-
// https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#parse-number.
38+
// https://httpwg.org/specs/rfc8941.html#parse-number.
3939
func parseNumber(s *scanner) (interface{}, error) {
4040
neg := isNeg(s)
4141
if neg && s.eof() {

item.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
)
66

77
// Item is a bare value and associated parameters.
8-
// See https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#item.
8+
// See https://httpwg.org/specs/rfc8941.html#item.
99
type Item struct {
1010
Value interface{}
1111
Params *Params
@@ -22,7 +22,7 @@ func (i Item) member() {
2222
}
2323

2424
// marshalSFV serializes as defined in
25-
// https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#ser-item.
25+
// https://httpwg.org/specs/rfc8941.html#ser-item.
2626
func (i Item) marshalSFV(b *strings.Builder) error {
2727
if i.Value == nil {
2828
return ErrInvalidBareItem
@@ -36,7 +36,7 @@ func (i Item) marshalSFV(b *strings.Builder) error {
3636
}
3737

3838
// UnmarshalItem parses an item as defined in
39-
// https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#parse-item.
39+
// https://httpwg.org/specs/rfc8941.html#parse-item.
4040
func UnmarshalItem(v []string) (Item, error) {
4141
s := &scanner{
4242
data: strings.Join(v, ","),

0 commit comments

Comments
 (0)