h2spec

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2015 License: MIT Imports: 11 Imported by: 0

README

h2spec

h2spec is a conformance test tool for HTTP/2 server.
This tool supports draft-ietf-httpbis-http2-16.

Install

Go to the releases page, find the version you want, and download the zip file.

Build

  1. Make sure you have go 1.4 and set GOPATH appropriately
  2. Clone this repo and move to the cloned repo directory
  3. Run go get github.com/bradfitz/http2
  4. Run go build cmd/h2spec.go

Usage

$ h2spec --help
Usage: h2spec [OPTIONS]

Options:
  -p:     Target port. (Default: 80)
  -h:     Target host. (Default: 127.0.0.1)
  -t:     Connect over TLS. (Default: false)
  -k:     Don't verify server's certificate. (Default: false)
  -o:     Maximum time allowed for test. (Default: 3)
  -s:     Section number on which to run the test. (Example: -s 6.1 -s 6.2)
  --help: Display this help and exit.

Screenshot

Sceenshot

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDummyData added in v0.0.2

func GetDummyData(num int) string

func PrintFooter

func PrintFooter()

func PrintHeader

func PrintHeader(title string, i int)

func PrintResult

func PrintResult(result bool, desc string, msg string, i int)

func Run

func Run(ctx *Context)

func SetReadTimer

func SetReadTimer(conn net.Conn, sec time.Duration)

func TestConnectionErrorHandling

func TestConnectionErrorHandling(ctx *Context)

func TestConnectionSpecificHeaderFields added in v0.0.2

func TestConnectionSpecificHeaderFields(ctx *Context)

func TestContinuation added in v0.0.2

func TestContinuation(ctx *Context)

func TestData

func TestData(ctx *Context)

func TestDefinedSettingsParameters added in v0.0.2

func TestDefinedSettingsParameters(ctx *Context)

func TestErrorHandling

func TestErrorHandling(ctx *Context)

func TestFrameSize

func TestFrameSize(ctx *Context)

func TestGoaway added in v0.0.2

func TestGoaway(ctx *Context)

func TestHTTPHeaderFields added in v0.0.2

func TestHTTPHeaderFields(ctx *Context)

func TestHTTPRequestResponseExchange added in v0.0.2

func TestHTTPRequestResponseExchange(ctx *Context)

func TestHeaderCompressionAndDecompression

func TestHeaderCompressionAndDecompression(ctx *Context)

func TestHeaders

func TestHeaders(ctx *Context)

func TestHttp2ConnectionPreface

func TestHttp2ConnectionPreface(ctx *Context)

func TestInitialFlowControlWindowSize added in v0.0.2

func TestInitialFlowControlWindowSize(ctx *Context)

func TestMalformedRequestsAndResponses added in v0.0.2

func TestMalformedRequestsAndResponses(ctx *Context)

func TestPing added in v0.0.2

func TestPing(ctx *Context)

func TestPriority added in v0.0.2

func TestPriority(ctx *Context)

func TestPseudoHeaderFields added in v0.0.2

func TestPseudoHeaderFields(ctx *Context)

func TestRequestPseudoHeaderFields added in v0.0.2

func TestRequestPseudoHeaderFields(ctx *Context)

func TestRstStream added in v0.0.2

func TestRstStream(ctx *Context)

func TestServerPush added in v0.0.3

func TestServerPush(ctx *Context)

func TestSettings added in v0.0.2

func TestSettings(ctx *Context)

func TestStreamIdentifiers

func TestStreamIdentifiers(ctx *Context)

func TestStreamStates

func TestStreamStates(ctx *Context)

func TestWindowUpdate added in v0.0.2

func TestWindowUpdate(ctx *Context)

Types

type Context

type Context struct {
	Port      int
	Host      string
	Tls       bool
	TlsConfig *tls.Config
	Sections  map[string]bool
	Timeout   time.Duration
}

func (*Context) Authority

func (ctx *Context) Authority() string

func (*Context) IsTarget added in v0.0.3

func (ctx *Context) IsTarget(section string) bool

type Http2Conn

type Http2Conn struct {
	// contains filtered or unexported fields
}

func CreateHttp2Conn

func CreateHttp2Conn(ctx *Context, sn bool) *Http2Conn

func (*Http2Conn) ReadFrame added in v0.0.3

func (h2Conn *Http2Conn) ReadFrame(t time.Duration) (http2.Frame, error)

ReadFrame reads a complete HTTP/2 frame from underlying connection. This function blocks until a complete frame is received or timeout t is expired. The returned http2.Frame must not be used after next ReadFrame call.

type TcpConn

type TcpConn struct {
	// contains filtered or unexported fields
}

func CreateTcpConn

func CreateTcpConn(ctx *Context) *TcpConn

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL