wirepair / gcd

Unofficial implementation of the Google Chrome Remote Debugger in Go
MIT License
186 stars 31 forks source link

optional parameters are sent even if they belong to optional field and set with empty values #6

Closed yukinying closed 7 years ago

yukinying commented 8 years ago

I noticed that the requests are sent with all the parameters filled. Empty parameters, when filled with "" or 0, are sent, even if it is an optional field. This seems to be deviated from the protocol description, and is causing some issues when using some api.

I wonder if this is a known issue, and is there a plan to fix that? I would like to provide some commits to fix this issue if there is no plan to fix that yet.

wirepair commented 8 years ago

Yeah I actually ran into this in autogcd (https://github.com/wirepair/autogcd/blob/master/api_overrides.go) was my fix to get around it temporarily. I agree it should be fixed, if you already have some commits ready I'd be happy to look them over! Thanks.