(meek_lite) Explicitly set Content-Length to zero when there is no data to send.

https://gitweb.torproject.org/pluggable-transports/meek.git/commit/?h=0.28&id=0ea861efe5873b517fbd08c4bc48027e4db16a95
merge-requests/3/head
Yawning Angel 6 years ago
parent e3d4c5308d
commit 89c21805c2

@ -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

@ -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
}

Loading…
Cancel
Save