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

Side by Side Diff: spdy/types.go

Issue 6781053: code review 6781053: go.net/spdy: disallow stream id 0
Patch Set: diff -r 3fefc1da6aa9 https://code.google.com/p/go.net Created 11 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « spdy/spdy_test.go ('k') | spdy/write.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // Package spdy implements SPDY protocol which is described in 5 // Package spdy implements SPDY protocol which is described in
6 // draft-mbelshe-httpbis-spdy-00. 6 // draft-mbelshe-httpbis-spdy-00.
7 // 7 //
8 // http://tools.ietf.org/html/draft-mbelshe-httpbis-spdy-00 8 // http://tools.ietf.org/html/draft-mbelshe-httpbis-spdy-00
9 package spdy 9 package spdy
10 10
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 type ErrorCode string 308 type ErrorCode string
309 309
310 const ( 310 const (
311 UnlowercasedHeaderName ErrorCode = "header was not lowercased" 311 UnlowercasedHeaderName ErrorCode = "header was not lowercased"
312 DuplicateHeaders ErrorCode = "multiple headers with same name" 312 DuplicateHeaders ErrorCode = "multiple headers with same name"
313 WrongCompressedPayloadSize ErrorCode = "compressed payload size was inco rrect" 313 WrongCompressedPayloadSize ErrorCode = "compressed payload size was inco rrect"
314 UnknownFrameType ErrorCode = "unknown frame type" 314 UnknownFrameType ErrorCode = "unknown frame type"
315 InvalidControlFrame ErrorCode = "invalid control frame" 315 InvalidControlFrame ErrorCode = "invalid control frame"
316 InvalidDataFrame ErrorCode = "invalid data frame" 316 InvalidDataFrame ErrorCode = "invalid data frame"
317 InvalidHeaderPresent ErrorCode = "frame contained invalid header" 317 InvalidHeaderPresent ErrorCode = "frame contained invalid header"
318 ZeroStreamId ErrorCode = "stream id zero is disallowed"
318 ) 319 )
319 320
320 // Error contains both the type of error and additional values. StreamId is 0 321 // Error contains both the type of error and additional values. StreamId is 0
321 // if Error is not associated with a stream. 322 // if Error is not associated with a stream.
322 type Error struct { 323 type Error struct {
323 Err ErrorCode 324 Err ErrorCode
324 StreamId uint32 325 StreamId uint32
325 } 326 }
326 327
327 func (e *Error) Error() string { 328 func (e *Error) Error() string {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 return nil, err 365 return nil, err
365 } 366 }
366 framer := &Framer{ 367 framer := &Framer{
367 w: w, 368 w: w,
368 headerBuf: compressBuf, 369 headerBuf: compressBuf,
369 headerCompressor: compressor, 370 headerCompressor: compressor,
370 r: r, 371 r: r,
371 } 372 }
372 return framer, nil 373 return framer, nil
373 } 374 }
OLDNEW
« no previous file with comments | « spdy/spdy_test.go ('k') | spdy/write.go » ('j') | no next file with comments »

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