Skip to content

Commit

Permalink
go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
monicasarbu committed May 11, 2014
1 parent 110bdb0 commit 453e510
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion http.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ func state_body_chunked_start(s *HttpStream, m *HttpMessage) (cont bool, ok bool
return true, false, false
}


func state_body_chunked(s *HttpStream, m *HttpMessage) (cont bool, ok bool, complete bool) {
if len(s.data[s.parseOffset:]) >= m.chunked_length-s.bodyReceived+2 /*\r\n*/ {
// Received more data than expected
Expand Down
10 changes: 4 additions & 6 deletions http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,14 +548,14 @@ func TestEatBodyChunked(t *testing.T) {
[]byte("\n0\r\n"),
}
stream := &HttpStream{
data: msgs[0],
parseOffset: 0,
data: msgs[0],
parseOffset: 0,
bodyReceived: 0,
parseState: BODY_CHUNKED_START,
parseState: BODY_CHUNKED_START,
}
message := &HttpMessage{
chunked_length: 5,
ContentLength: 0,
ContentLength: 0,
}

cont, ok, complete := state_body_chunked_start(stream, message)
Expand Down Expand Up @@ -593,7 +593,6 @@ func TestEatBodyChunked(t *testing.T) {
t.Error("Wrong parseOffset")
}


cont, ok, complete = state_body_chunked_start(stream, message)
if cont != true {
t.Error("Wrong return values")
Expand All @@ -608,7 +607,6 @@ func TestEatBodyChunked(t *testing.T) {
t.Error("Wrong state")
}


cont, ok, complete = state_body_chunked(stream, message)
if cont != false || ok != true || complete != false {
t.Error("Wrong return values")
Expand Down

0 comments on commit 453e510

Please sign in to comment.