Merge pull request #308 from TheOriginalWinCat/upstream
Make numwant in http request optional
This commit is contained in:
commit
00ab4acc98
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ func ParseAnnounce(r *http.Request, realIPHeader string, allowIPSpoofing bool) (
|
|||
}
|
||||
|
||||
numwant, err := qp.Uint64("numwant")
|
||||
if err != nil {
|
||||
if err != nil && err != bittorrent.ErrKeyNotFound {
|
||||
return nil, bittorrent.ClientError("failed to parse parameter: numwant")
|
||||
}
|
||||
request.NumWant = uint32(numwant)
|
||||
|
|
Loading…
Add table
Reference in a new issue