Increase the suggested body buffer size for the HTTP hook server #77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This eliminates potential issues if the HTTP POST size to the hook server containing the cert exceeded nginx's default buffer size (which would prevent the hook server from being able to parse the POST args): #65
Based on some quick tests, it looks like the POST to
/deploy-cert
, containing the certificate chain and private key was the largest POST. These look to be in the neighborhood of 10KB, while nginx's defaultclient_body_buffer_size
might be either 8KB or 16KB depending on the exact system architecture. To address this, increase the suggested configuration in the README to 128KB (which is probably overkill, but provides plenty of space in case Let's Encrypt's full certificate chain ever becomes bigger).This also adds some better error logging and error handling to the hook server, and adds more specific tests around the hook server.