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

Make error codes smaller #723

Closed
wants to merge 59 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
3aafa6e
Require that parameters only appear once.
ekr Sep 25, 2017
0a9c534
reference format
reschke Sep 26, 2017
898f03c
Merge branch 'patch-9' of https://github.com/reschke/base-drafts into…
martinthomson Sep 28, 2017
ad02c02
Correct formatting error
martinthomson Sep 28, 2017
0f80d25
Error code for duplicate parameters
martinthomson Sep 28, 2017
1400dd5
Merge pull request #792 from ekr/extensions_may_only_appear_once
martinthomson Sep 28, 2017
aa0a4d7
Don't retransmit old MAX_STREAM_DATA and MAX_DATA
Sep 28, 2017
d704d00
reflow
Sep 28, 2017
00c5a74
Allow RST_STREAM to be sent and received after FIN
Sep 19, 2017
b516f91
Rephrase.
Sep 19, 2017
c425056
ekr/ianswett comments
Sep 19, 2017
0bd0053
mike's comment
Sep 19, 2017
842cc28
martin's nits
Sep 28, 2017
ebc931d
Merge pull request #781 from quicwg/fin-rst
martinthomson Sep 28, 2017
eb39a2a
A tiny nit: the ClientHello is not subject to MAX_STREAM_DATA.
ekr Sep 28, 2017
47bd325
Nits from Jana
ekr Sep 28, 2017
866b88f
reflow
martinthomson Sep 28, 2017
f83d06c
Test with circle v2 infrastructure, which should be faster
martinthomson Sep 28, 2017
eb8f61b
Maybe this is the problem with the syntax
martinthomson Sep 28, 2017
075702b
Update CONTRIBUTING.md
mnot Sep 29, 2017
9a899ef
Update CONTRIBUTING.md
mnot Sep 29, 2017
0d64361
Update YAML file and hope that it's OK
martinthomson Sep 29, 2017
131141a
Ignore result of gh-issues
martinthomson Sep 29, 2017
51f5d55
Merge branch 'circlev2'
martinthomson Sep 29, 2017
585d504
close connection when receiving unprotected ACKs for protected packet…
marten-seemann Oct 1, 2017
83576f3
Specify what to do with bogus streams. Fixes #791
ekr Oct 1, 2017
4ff84a0
Retransmit stream data, not stream frames
ianswett Oct 2, 2017
1feb357
Fixes the definition of recovery
ianswett Oct 2, 2017
92d3e46
typo fix (#811)
ekr Oct 2, 2017
d93dd90
Must not ack acks
ianswett Oct 2, 2017
e5dfab2
Merge pull request #812 from ekr/stream_state_error
martinthomson Oct 2, 2017
9aa2a10
Update draft-ietf-quic-transport.md
ianswett Oct 2, 2017
fc1207f
Merge pull request #813 from quicwg/ianswett-retrans-streamframes-1
martinthomson Oct 2, 2017
9105969
Update draft-ietf-quic-transport.md
ianswett Oct 2, 2017
7edf4e0
Simplify stateless retry. There's no reason for it to contain ACKs
ekr Oct 2, 2017
03db4e3
Revise text a bit
ekr Oct 2, 2017
fcb91e3
Grrr... Line length
ekr Oct 2, 2017
badce41
Correct statement on padding
martinthomson Oct 3, 2017
ca81183
Capitalize ACK
martinthomson Oct 3, 2017
6a1bdd6
Merge pull request #815 from quicwg/ianswett-must-not-ack-acks
martinthomson Oct 3, 2017
378fa42
Clarify the first flight, explicitly excluding NST
ekr Oct 3, 2017
b995766
Merge pull request #828 from ekr/first_flight
martinthomson Oct 3, 2017
1153939
Update CONTRIBUTING.md
mnot Oct 5, 2017
f0034b4
Split error code space (#722)
martinthomson Oct 5, 2017
5cc00fe
Remove Timestamps
ianswett Oct 6, 2017
94d820a
Remove timestamps from Recovery
ianswett Oct 6, 2017
51a27f8
Merge pull request #841 from quicwg/ianswett-remove-timestamps
martinthomson Oct 8, 2017
a0c571b
AEAD all packets. Fixed #693, Fixes #840.
ekr Oct 9, 2017
cf60548
Update salt. This salt isn't random but rather is the git hash of
ekr Oct 9, 2017
7966498
Merge pull request #844 from ekr/aead_all_the_things
martinthomson Oct 10, 2017
66ab0da
Followup for cleartext AEAD change
martinthomson Oct 10, 2017
774270c
Merge pull request #845 from quicwg/fixup-aead
martinthomson Oct 10, 2017
372c1e6
capitalize STREAM
martinthomson Oct 10, 2017
ac65e65
Merge pull request #817 from ekr/simplify_stateless_retry
martinthomson Oct 10, 2017
7aca157
Version Negotiation packet format is version-invariant (#819)
martinthomson Oct 10, 2017
871ec71
Fixup for #817
martinthomson Oct 10, 2017
d7b3a39
Merge pull request #807 from quicwg/old-max-data
martinthomson Oct 10, 2017
552b6bc
HTTP Integration Error Nits
mcmanus Sep 21, 2017
8c08acc
Make error codes smaller
martinthomson Oct 5, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
58 changes: 58 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,58 @@
version: 2
jobs:
build:
docker:
- image: martinthomson/i-d-template:latest
working_directory: ~/draft
steps:
- checkout

# Prime caches for faster checkout
- restore_cache:
keys:
- template
- run:
name: "Update Template"
command: "git -C ~/i-d-template remote update --prune"
- save_cache:
key: template
paths:
- ~/i-d-template

# Build txt and html versions of drafts
- restore_cache:
keys:
- refcache
- run:
name: "Build Drafts"
command: "make 'CLONE_ARGS=--reference ~/i-d-template'"
- save_cache:
key: refcache
paths:
- ~/.cache/xml2rfc

# Create and store artifacts
- run:
name: "Create Artifacts"
command: "make artifacts CI_ARTIFACTS=/tmp/artifacts"

- store_artifacts:
path: /tmp/artifacts

# Update gh-pages and gh-issues branches
- run:
name: "Update GitHub Pages"
command: "make gh-pages"


- run:
name: "Save Issues"
command: "make gh-issues || true"

# For tagged builds, upload to the datatracker.
- run:
name: "Upload to Datatracker"
command: |
if [ "${CIRCLE_TAG#draft-}" != "${CIRCLE_TAG}" ]; then
make upload
fi
8 changes: 5 additions & 3 deletions CONTRIBUTING.md
@@ -1,6 +1,8 @@
# Contributing to QUIC

Before submitting feedback, please familiarize yourself with our current [issues list](https://github.com/quicwg/base-drafts/issues) and [charter](https://datatracker.ietf.org/wg/quic/about/). If you're
Anyone can contribute to QUIC; you don't have to join the Working Group, because there is no "membership" -- anyone who participates in the work, as outlined below, is part of the QUIC Working Group.

Before doing so, it's a good idea to familiarize yourself with our current [issues list](https://github.com/quicwg/base-drafts/issues) and [charter](https://datatracker.ietf.org/wg/quic/about/). If you're
new to this, you may also want to read the [Tao of the IETF](https://www.ietf.org/tao.html).

**Be aware that all contributions fall under the "NOTE WELL" terms outlined below.**
Expand All @@ -24,7 +26,7 @@ new to this, you may also want to read the [Tao of the IETF](https://www.ietf.or

The Working Group has a few venues for discussion:

* We plan to meet at all [IETF meetings](https://www.ietf.org/meeting/) for the foreseeable future, and hold interim meetings between them, at least through 2017. See our [meeting materials repository](https://github.com/quicwg/wg-materials) and the [official proceedings](https://datatracker.ietf.org/wg/quic/meetings/).
* We plan to meet at all [IETF meetings](https://www.ietf.org/meeting/) for the foreseeable future, and hold interim meetings between them. See our [meeting materials repository](https://github.com/quicwg/wg-materials) and the [official proceedings](https://datatracker.ietf.org/wg/quic/meetings/).

* Our [mailing list](https://www.ietf.org/mailman/listinfo/quic) is used for most communication, including notifications of meetings, new drafts, consensus calls and other business, as well as issue discussion.

Expand All @@ -41,7 +43,7 @@ their resolution.

Before filing a new issue, please consider a few things:

* Issues should be just that; issues with our deliverables, **not questions or support requests**.
* Issues should be just that; issues with our deliverables, **not proposals, questions or support requests**.
* Please review the issues list to make sure that you aren't filing a duplicate.
* If you're not sure how to phrase your issue, please ask on the [mailing list](https://www.ietf.org/mailman/listinfo/quic).

Expand Down
12 changes: 7 additions & 5 deletions Makefile
@@ -1,13 +1,15 @@
MD_PREPROCESSOR := sed -e 's/{DATE}/$(shell date '+%Y-%m')/g'

include lib/main.mk
LIBDIR := lib
include $(LIBDIR)/main.mk

lib/main.mk:
ifneq (,$(shell git submodule status lib 2>/dev/null))
$(LIBDIR)/main.mk:
ifneq (,$(shell git submodule status $(LIBDIR) 2>/dev/null))
git submodule sync
git submodule update --init
git submodule update $(CLONE_ARGS) --init
else
git clone -q --depth 10 -b master https://github.com/martinthomson/i-d-template.git lib
git clone -q --depth 10 $(CLONE_ARGS) \
-b master https://github.com/martinthomson/i-d-template $(LIBDIR)
endif

latest:: lint
Expand Down
32 changes: 0 additions & 32 deletions circle.yml

This file was deleted.

101 changes: 55 additions & 46 deletions draft-ietf-quic-http.md
Expand Up @@ -872,74 +872,81 @@ establishment to servers.
QUIC allows the application to abruptly terminate (reset) individual streams or
the entire connection when an error is encountered. These are referred to as
"stream errors" or "connection errors" and are described in more detail in
[QUIC-TRANSPORT].
{{QUIC-TRANSPORT}}.

This section describes HTTP-specific error codes which can be used to express
the cause of a connection or stream error.

## HTTP-Defined QUIC Error Codes {#http-error-codes}
## HTTP/QUIC Error Codes {#http-error-codes}

QUIC allocates error codes 0x0000-0x3FFF to application protocol definition. The
following error codes are defined by HTTP for use in QUIC RST_STREAM and
CONNECTION_CLOSE frames.
The following error codes are defined for use in QUIC RST_STREAM, STOP_SENDING,
and CONNECTION_CLOSE frames when using HTTP/QUIC.

HTTP_PUSH_REFUSED (0x01):
STOPPING (0x00):
: This value is reserved by the transport to be used in response to QUIC
STOP_SENDING frames.

HTTP_NO_ERROR (0x01):
: No error. This is used when the connection or stream needs to be closed, but
there is no error to signal.

HTTP_PUSH_REFUSED (0x02):
: The server has attempted to push content which the client will not accept
on this connection.

HTTP_INTERNAL_ERROR (0x02):
HTTP_INTERNAL_ERROR (0x03):
: An internal error has occurred in the HTTP stack.

HTTP_PUSH_ALREADY_IN_CACHE (0x03):
HTTP_PUSH_ALREADY_IN_CACHE (0x04):
: The server has attempted to push content which the client has cached.

HTTP_REQUEST_CANCELLED (0x04):
HTTP_REQUEST_CANCELLED (0x05):
: The client no longer needs the requested data.

HTTP_HPACK_DECOMPRESSION_FAILED (0x05):
HTTP_HPACK_DECOMPRESSION_FAILED (0x06):
: HPACK failed to decompress a frame and cannot continue.

HTTP_CONNECT_ERROR (0x06):
HTTP_CONNECT_ERROR (0x07):
: The connection established in response to a CONNECT request was reset or
abnormally closed.

HTTP_EXCESSIVE_LOAD (0x07):
HTTP_EXCESSIVE_LOAD (0x08):
: The endpoint detected that its peer is exhibiting a behavior that might be
generating excessive load.

HTTP_VERSION_FALLBACK (0x08):
HTTP_VERSION_FALLBACK (0x09):
: The requested operation cannot be served over HTTP/QUIC. The peer should
retry over HTTP/2.

HTTP_MALFORMED_HEADERS (0x09):
HTTP_MALFORMED_HEADERS (0x0A):
: A HEADERS frame has been received with an invalid format.

HTTP_MALFORMED_PRIORITY (0x0A):
HTTP_MALFORMED_PRIORITY (0x0B):
: A PRIORITY frame has been received with an invalid format.

HTTP_MALFORMED_SETTINGS (0x0B):
HTTP_MALFORMED_SETTINGS (0x0C):
: A SETTINGS frame has been received with an invalid format.

HTTP_MALFORMED_PUSH_PROMISE (0x0C):
HTTP_MALFORMED_PUSH_PROMISE (0x0D):
: A PUSH_PROMISE frame has been received with an invalid format.

HTTP_MALFORMED_DATA (0x0D):
HTTP_MALFORMED_DATA (0x0E):
: A DATA frame has been received with an invalid format.

HTTP_INTERRUPTED_HEADERS (0x0E):
HTTP_INTERRUPTED_HEADERS (0x0F):
: A HEADERS frame without the End Header Block flag was followed by a frame
other than HEADERS.

HTTP_WRONG_STREAM (0x0F):
HTTP_WRONG_STREAM (0x10):
: A frame was received on stream where it is not permitted.

HTTP_MULTIPLE_SETTINGS (0x10):
HTTP_MULTIPLE_SETTINGS (0x11):
: More than one SETTINGS frame was received.

HTTP_MALFORMED_PUSH (0x11):
HTTP_MALFORMED_PUSH (0x12):
: A push stream header was malformed or included an invalid Push ID.

HTTP_MALFORMED_MAX_PUSH_ID (0x12):
HTTP_MALFORMED_MAX_PUSH_ID (0x13):
: A MAX_PUSH_ID frame has been received with an invalid format.


Expand Down Expand Up @@ -1089,11 +1096,11 @@ QUIC has the same concepts of "stream" and "connection" errors that HTTP/2
provides. However, because the error code space is shared between multiple
components, there is no direct portability of HTTP/2 error codes.

The HTTP/2 error codes defined in Section 7 of {{!RFC7540}} map to QUIC error
codes as follows:
The HTTP/2 error codes defined in Section 7 of {{!RFC7540}} map to the HTTP over
QUIC error codes as follows:

NO_ERROR (0x0):
: QUIC_NO_ERROR
: HTTP_NO_ERROR in {{http-error-codes}}.

PROTOCOL_ERROR (0x1):
: No single mapping. See new HTTP_MALFORMED_* error codes defined in
Expand Down Expand Up @@ -1270,7 +1277,7 @@ The entries in the following table are registered by this document.
## Error Codes {#iana-error-codes}

This document establishes a registry for HTTP/QUIC error codes. The
"HTTP/QUIC Error Code" registry manages a 30-bit space. The "HTTP/QUIC
"HTTP/QUIC Error Code" registry manages a 16-bit space. The "HTTP/QUIC
Error Code" registry operates under the "Expert Review" policy
{{?RFC5226}}.

Expand All @@ -1285,7 +1292,7 @@ Name:
: A name for the error code. Specifying an error code name is optional.

Code:
: The 30-bit error code value.
: The 16-bit error code value.

Description:
: A brief description of the error code semantics, longer if no detailed
Expand All @@ -1299,24 +1306,26 @@ The entries in the following table are registered by this document.
|-----------------------------------|--------|----------------------------------------|----------------------|
| Name | Code | Description | Specification |
|-----------------------------------|--------|----------------------------------------|----------------------|
| HTTP_PUSH_REFUSED | 0x01 | Client refused pushed content | {{http-error-codes}} |
| HTTP_INTERNAL_ERROR | 0x02 | Internal error | {{http-error-codes}} |
| HTTP_PUSH_ALREADY_IN_CACHE | 0x03 | Pushed content already cached | {{http-error-codes}} |
| HTTP_REQUEST_CANCELLED | 0x04 | Data no longer needed | {{http-error-codes}} |
| HTTP_HPACK_DECOMPRESSION_FAILED | 0x05 | HPACK cannot continue | {{http-error-codes}} |
| HTTP_CONNECT_ERROR | 0x06 | TCP reset or error on CONNECT request | {{http-error-codes}} |
| HTTP_EXCESSIVE_LOAD | 0x07 | Peer generating excessive load | {{http-error-codes}} |
| HTTP_VERSION_FALLBACK | 0x08 | Retry over HTTP/2 | {{http-error-codes}} |
| HTTP_MALFORMED_HEADERS | 0x09 | Invalid HEADERS frame | {{http-error-codes}} |
| HTTP_MALFORMED_PRIORITY | 0x0A | Invalid PRIORITY frame | {{http-error-codes}} |
| HTTP_MALFORMED_SETTINGS | 0x0B | Invalid SETTINGS frame | {{http-error-codes}} |
| HTTP_MALFORMED_PUSH_PROMISE | 0x0C | Invalid PUSH_PROMISE frame | {{http-error-codes}} |
| HTTP_MALFORMED_DATA | 0x0D | Invalid DATA frame | {{http-error-codes}} |
| HTTP_INTERRUPTED_HEADERS | 0x0E | Incomplete HEADERS block | {{http-error-codes}} |
| HTTP_WRONG_STREAM | 0x0F | A frame was sent on the wrong stream | {{http-error-codes}} |
| HTTP_MULTIPLE_SETTINGS | 0x10 | Multiple SETTINGS frames | {{http-error-codes}} |
| HTTP_MALFORMED_PUSH | 0x11 | Invalid push stream header | {{http-error-codes}} |
| HTTP_MALFORMED_MAX_PUSH_ID | 0x12 | Invalid MAX_PUSH_ID frame | {{http-error-codes}} |
| STOPPING | 0x00 | Reserved by QUIC | {{QUIC-TRANSPORT}} |
| HTTP_NO_ERROR | 0x01 | No error | {{http-error-codes}} |
| HTTP_PUSH_REFUSED | 0x02 | Client refused pushed content | {{http-error-codes}} |
| HTTP_INTERNAL_ERROR | 0x03 | Internal error | {{http-error-codes}} |
| HTTP_PUSH_ALREADY_IN_CACHE | 0x04 | Pushed content already cached | {{http-error-codes}} |
| HTTP_REQUEST_CANCELLED | 0x05 | Data no longer needed | {{http-error-codes}} |
| HTTP_HPACK_DECOMPRESSION_FAILED | 0x06 | HPACK cannot continue | {{http-error-codes}} |
| HTTP_CONNECT_ERROR | 0x07 | TCP reset or error on CONNECT request | {{http-error-codes}} |
| HTTP_EXCESSIVE_LOAD | 0x08 | Peer generating excessive load | {{http-error-codes}} |
| HTTP_VERSION_FALLBACK | 0x09 | Retry over HTTP/2 | {{http-error-codes}} |
| HTTP_MALFORMED_HEADERS | 0x0A | Invalid HEADERS frame | {{http-error-codes}} |
| HTTP_MALFORMED_PRIORITY | 0x0B | Invalid PRIORITY frame | {{http-error-codes}} |
| HTTP_MALFORMED_SETTINGS | 0x0C | Invalid SETTINGS frame | {{http-error-codes}} |
| HTTP_MALFORMED_PUSH_PROMISE | 0x0D | Invalid PUSH_PROMISE frame | {{http-error-codes}} |
| HTTP_MALFORMED_DATA | 0x0E | Invalid DATA frame | {{http-error-codes}} |
| HTTP_INTERRUPTED_HEADERS | 0x0F | Incomplete HEADERS block | {{http-error-codes}} |
| HTTP_WRONG_STREAM | 0x10 | A frame was sent on the wrong stream | {{http-error-codes}} |
| HTTP_MULTIPLE_SETTINGS | 0x11 | Multiple SETTINGS frames | {{http-error-codes}} |
| HTTP_MALFORMED_PUSH | 0x12 | Invalid push stream header | {{http-error-codes}} |
| HTTP_MALFORMED_MAX_PUSH_ID | 0x13 | Invalid MAX_PUSH_ID frame | {{http-error-codes}} |
|-----------------------------------|--------|----------------------------------------|----------------------|


Expand Down
16 changes: 9 additions & 7 deletions draft-ietf-quic-recovery.md
Expand Up @@ -102,8 +102,7 @@ important to the loss detection and congestion control machinery below.
machinery of QUIC underneath.

* ACK frames contain acknowledgment information. QUIC uses a SACK-based
scheme, where acks express up to 256 ranges. The ACK frame also includes a
receive timestamp for each packet newly acked.
scheme, where acks express up to 256 ranges.

## Relevant Differences Between QUIC and TCP

Expand Down Expand Up @@ -529,7 +528,8 @@ largest acked packet is supplied.

#### Handshake Packets

The receiver MUST ignore unprotected packets that ack protected packets.
The receiver MUST close the connection with an error of type OPTIMISTIC_ACK
when receiving an unprotected packet that acks protected packets.
The receiver MUST trust protected acks for unprotected packets, however. Aside
from this, loss detection for handshake packets when an ack is processed is
identical to other packets.
Expand Down Expand Up @@ -607,10 +607,12 @@ window and sets the slow start threshold to the new congestion window.
## Recovery Period

Recovery is a period of time beginning with detection of a lost packet.
Because QUIC retransmits frames, not packets, it defines the end of
recovery as all packets outstanding at the start of recovery being
acknowledged or lost. This is slightly different from TCP's definition of
recovery ending when the lost packet that started recovery is acknowledged.
Because QUIC retransmits stream data and control frames, not packets,
it defines the end of recovery as a packet sent after the start of
recovery being acknowledged. This is slightly different from TCP's
definition of recovery ending when the lost packet that started
recovery is acknowledged.

During recovery, the congestion window is not increased or decreased.
As such, multiple lost packets only decrease the congestion window once as
long as they're lost before exiting recovery. This causes QUIC to decrease
Expand Down