install gnatsd before setting GOPATH

Install after results in gnatsd being installed into the Godeps dir instead

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>
Switch to ReverseProxy

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>
Convert testcases to Ginkgo/Gomega

- Add ginkgo & gomega
- Updated all dependencies
- Extracted NATS client for testing

[#63154330]

Signed-off-by: Michael Fraenkel <fraenkel@us.ibm.com>
More robust test script for use on CI environments

- Go & GOPATH are required
- gnatsd is downloaded & installed (if not already installed) into the
  existing GOPATH
- ginkgo is installed from Godeps into the Godeps workspace
- Godeps workspace is prepended onto PATH to prefer Godep dependency versions
  over local versions
- To use local dependencies, use `ginkgo -r` instead of `scripts/test`

[#63154330]
Updated readme to reflect ginkgo and test script changes

[#63154330]

Signed-off-by: Michael Fraenkel <fraenkel@us.ibm.com>
Fix all data races
Added -race to the test script

[#63154330]

Signed-off-by: Michael Fraenkel <fraenkel@us.ibm.com>
Abstracted test app locking

[#63154330]

Signed-off-by: Michael Fraenkel <fraenkel@us.ibm.com>
Refactor, remove unneeded bits

[#63154330]

Signed-off-by: Karl Isenberg <kisenberg@pivotallabs.com>

Conflicts:
	Godeps/Godeps.json
	main.go
	router/helper_test.go
	router/integration_test.go
	router/router.go
	router/router_test.go
Drain and Stop the gorouter

Allow component to stop
Allow router to drain and stop
Add proper signal handling
Disable keepalives on inbound request and proxy

[#69785590]

Signed-off-by: Chris Adams <cadams@pivotallabs.com>

Conflicts:
	Godeps/Godeps.json
	Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go
	Godeps/_workspace/src/github.com/onsi/gomega/gbytes/say_matcher.go
	Godeps/_workspace/src/github.com/onsi/gomega/gbytes/say_matcher_test.go
	Godeps/_workspace/src/github.com/onsi/gomega/gexec/exit_matcher_test.go
	Godeps/_workspace/src/github.com/onsi/gomega/gexec/session.go
	Godeps/_workspace/src/github.com/onsi/gomega/gexec/session_test.go
	Godeps/_workspace/src/github.com/onsi/gomega/ghttp/handlers.go
	main.go
	main_test.go
	proxy/proxy.go
	router/router.go
Fix log message

This code was originally lifted from Diego which uses the term executor

Signed-off-by: Chris Adams <cadams@pivotallabs.com>
Allow more time for slow CI builds on slow boxes

Signed-off-by: David Varvel <dvarvel@pivotallabs.com>
Time out later for slowerer Travises

Signed-off-by: David Varvel <dvarvel@pivotallabs.com>
Add a configurable drain timeout

- Add a drain timeout for testing purposes
- Fix the drain test to guarantee drain timeout < request timeout
- Add a testcase to verify no connections are allowed during drain

[#69785590]

Signed-off-by: Matthew Sykes <matthew.sykes@gmail.com>
Use the drain timeout

- Use the drain timeout
- Set the timeouts properly

[#69785590]

Signed-off-by: Matthew Sykes <matthew.sykes@gmail.com>
Update dependencies

[#i69786534]

Signed-off-by: Matthew Sykes <matthew.sykes@gmail.com>
Retry on failed connects

- Fix all go vet issues

[#69786534]

Signed-off-by: Matthew Sykes <matthew.sykes@gmail.com>
Revert "Retry on failed connects"

This reverts commit 6fcbce25a48fea26f8bed6ba110c739aa28818e7.

Revert "Update dependencies"

This reverts commit 5f91639a0a5c37bfd1d2ce54cf99d8884e7c898a.

Signed-off-by: Matthew Sykes <matthew.sykes@gmail.com>
Handle comma-seperated and multiple Connection headers

Specifically in the case of Firefox where the client sends multiple values in a comma-seperated format for the Connection header (ie. "Connection: keep-alive, Upgrade"). This was preventing Firefox (tested on v28) from properly connecting to servies which provide a websocket endpoint, while other browsers (ie. Chrome) were able to connect.

Reference: http://tools.ietf.org/html/rfc2616#section-4.2

Quote:

 Multiple message-header fields with the same field-name MAY be
   present in a message if and only if the entire field-value for that
   header field is defined as a comma-separated list [i.e., #(values)].
   It MUST be possible to combine the multiple header fields into one
   "field-name: field-value" pair, without changing the semantics of the
   message, by appending each subsequent field-value to the first, each
   separated by a comma. The order in which header fields with the same
   field-name are received is therefore significant to the
   interpretation of the combined field value, and thus a proxy MUST NOT
   change the order of these field values when a message is forwarded.
Merge branch 'BrianMMcClain-firefox_websocket_fix'