Skip to content

Commit fae1778

Browse files
committed
fixes for js interop
1 parent e767486 commit fae1778

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

spdystream.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ func (c *conn) IsClosed() bool {
6868
// OpenStream creates a new stream.
6969
func (c *conn) OpenStream() (smux.Stream, error) {
7070
s, err := c.spdyConn().CreateStream(http.Header{
71-
":method": []string{"GET"}, // this is here for HTTP/SPDY interop
72-
":path": []string{"/"}, // this is here for HTTP/SPDY interop
71+
":method": []string{"POST"}, // this is here for HTTP/SPDY interop
72+
":path": []string{"/"}, // this is here for HTTP/SPDY interop
7373
}, nil, false)
7474
if err != nil {
7575
return nil, err
@@ -100,7 +100,9 @@ func (c *conn) Serve(handler smux.StreamHandler) {
100100
// -- at this moment -- not the solution. Either spdystream must
101101
// change, or we must throttle another way. go-peerstream handles
102102
// every new stream in its own goroutine.
103-
err := s.SendReply(http.Header{}, false)
103+
err := s.SendReply(http.Header{
104+
":status": []string{"200"},
105+
}, false)
104106
if err != nil {
105107
// this _could_ error out. not sure how to handle this failure.
106108
// don't return, and let the caller handle a broken stream.

0 commit comments

Comments
 (0)