Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Golang: Initialize http.Client if passed nil in client.New #1265

Merged
merged 1 commit into from
Jul 9, 2016

Conversation

rolandshoemaker
Copy link
Contributor

If the http.Client passed to go/client.New is nil initialize it before passing client.LogClient back to the user (general Golang stdlib behavior as far as I can tell).

@rolandshoemaker
Copy link
Contributor Author

cc @pphaneuf / @phad: super short follow-up to #1264.

@pphaneuf pphaneuf added the LGTM label Jul 9, 2016
@pphaneuf
Copy link
Contributor

pphaneuf commented Jul 9, 2016

LGTM

@pphaneuf pphaneuf merged commit 0f6e3d1 into google:master Jul 9, 2016
gdbelvin added a commit to gdbelvin/certificate-transparency that referenced this pull request Jul 14, 2016
* upstream/master: (23 commits)
  Check for HTTP status 200 in fetchAndParse.
  Run everything through gofmt.
  Tweak the imports to make goimports happier.
  Initialize client if passed nil (google#1265)
  Have the caller supply the *http.Client used in logclient.go.
  Review fixes
  Use ASN1 lib to transform TLS encoded list into a Octet String
  Move SCTListLen Check to beginning
  Rework patch
  Add support for serializing SCT Lists
  Get rid of the Java MerkleLeafType enum.
  Add a missing entry to the .gitignore file.
  Get rid of the TLSSerializer class. Make the low-level serialization functions stand-alone ones in a namespace rather than members of a class.
  6962-bis: Implement OID parsing/serialization.
  Do not use std::move in "return" statements.
  Improve stats comments and add additional inc.
  Add additonal stats to outer FixAndLog wrapper.
  [golang] Merkle verifier (google#1161)
  Ignore clang warnings due to unused stuff caused by glog (google#1253)
  Remove a few unnecessary uses of std::move.
  ...
gdbelvin pushed a commit to gdbelvin/certificate-transparency that referenced this pull request Jul 18, 2016
gdbelvin added a commit to gdbelvin/certificate-transparency that referenced this pull request Jul 18, 2016
* upstream/master: (25 commits)
  Check for HTTP status 200 in fetchAndParse.
  Run everything through gofmt.
  Tweak the imports to make goimports happier.
  Initialize client if passed nil (google#1265)
  Have the caller supply the *http.Client used in logclient.go.
  Review fixes
  Use ASN1 lib to transform TLS encoded list into a Octet String
  Move SCTListLen Check to beginning
  Rework patch
  Add support for serializing SCT Lists
  Get rid of the Java MerkleLeafType enum.
  Add a missing entry to the .gitignore file.
  Get rid of the TLSSerializer class. Make the low-level serialization functions stand-alone ones in a namespace rather than members of a class.
  6962-bis: Implement OID parsing/serialization.
  Do not use std::move in "return" statements.
  Improve stats comments and add additional inc.
  Add additonal stats to outer FixAndLog wrapper.
  [golang] Merkle verifier (google#1161)
  Ignore clang warnings due to unused stuff caused by glog (google#1253)
  Remove a few unnecessary uses of std::move.
  ...
gdbelvin added a commit to gdbelvin/certificate-transparency that referenced this pull request Jul 18, 2016
* upstream/master: (25 commits)
  Check for HTTP status 200 in fetchAndParse.
  Run everything through gofmt.
  Tweak the imports to make goimports happier.
  Initialize client if passed nil (google#1265)
  Have the caller supply the *http.Client used in logclient.go.
  Review fixes
  Use ASN1 lib to transform TLS encoded list into a Octet String
  Move SCTListLen Check to beginning
  Rework patch
  Add support for serializing SCT Lists
  Get rid of the Java MerkleLeafType enum.
  Add a missing entry to the .gitignore file.
  Get rid of the TLSSerializer class. Make the low-level serialization functions stand-alone ones in a namespace rather than members of a class.
  6962-bis: Implement OID parsing/serialization.
  Do not use std::move in "return" statements.
  Improve stats comments and add additional inc.
  Add additonal stats to outer FixAndLog wrapper.
  [golang] Merkle verifier (google#1161)
  Ignore clang warnings due to unused stuff caused by glog (google#1253)
  Remove a few unnecessary uses of std::move.
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants