Skip to content

Commit

Permalink
(meek_lite) Explicitly set Content-Length to zero when there is no da…
Browse files Browse the repository at this point in the history
  • Loading branch information
Yawning committed Apr 21, 2018
1 parent e3d4c53 commit 89c2180
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Changes in version 0.0.8 - UNRELEASED:
- Bug 24793: Send the correct authorization HTTP header for basic auth.
- (meek_lite) Explicitly set Content-Length to zero when there is no data
to send.

Changes in version 0.0.7 - 2016-11-15:
- Support configuring the obfs4 IAT parameter as the sole
Expand Down
6 changes: 5 additions & 1 deletion transports/meeklite/meek.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,11 @@ func (c *meekConn) roundTrip(sndBuf []byte) (recvBuf []byte, err error) {
if c.args.front != "" {
url.Host = c.args.front
}
req, err = http.NewRequest("POST", url.String(), bytes.NewReader(sndBuf))
var body io.Reader
if len(sndBuf) > 0 {
body = bytes.NewReader(sndBuf)
}
req, err = http.NewRequest("POST", url.String(), body)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 89c2180

Please sign in to comment.