Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added guard protections for requests / responses #58

Closed
wants to merge 1 commit into from

Conversation

mhoglan
Copy link
Contributor

@mhoglan mhoglan commented Mar 7, 2015

Addresses #57

Add guard to handle if nil path is requested
Add guard to handle if content-length from response is -1 which represents that the response is chunked transfer encoding or EOF close response
@rlmcpherson
Copy link
Owner

Merged, thanks. Also added a test for the nil key scenario.

@rlmcpherson rlmcpherson closed this Mar 9, 2015
rlmcpherson added a commit that referenced this pull request Mar 9, 2015
* nil-key-request:
  add nil path test
  Add guard to handle if all chunks are read Add guard to handle if bytesRead is greater than content-length.  Should not occur as golang uses a LimitedReader up to the content-length, but if for some reason the bytesRead was greater than content-length, the getter will hang as it keeps trying to read the nextChunk (which does not exist)
  Fix OBOE when comparing cIdx and rChunk.size Remove the -1 occurring when checking if the current index (cIdx) was equal or greater than size of chunk (rChunk.size) being processed.  Both values are 1-based and there should not be the need to offset the size by 1;  cIdx starts at 0 initially, but is replaced by number of bytes read which is 1-based as it is a count and not an index into the range of bytes being read.
  Added guard protections for requests / responses Add guard to handle if nil path is requested Add guard to handle if content-length from response is -1 which represents that the response is chunked transfer encoding or EOF close response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants