Skip to content

Commit

Permalink
0.9.6 release with bug fix for chunked transfer encoding closure edge…
Browse files Browse the repository at this point in the history
… case
  • Loading branch information
DavidTompkins committed Jul 21, 2014
1 parent fede328 commit 8c7f7a3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
http_streaming_client 0.9.6 (07.21.2014)
========================================
* Fixed bug with connection close and uncompressed chunked transfer encoding

http_streaming_client 0.9.5 (05.23.2014)
========================================
* Added logging tag functions to add tags to log messages for multi-threaded environments
Expand Down
12 changes: 10 additions & 2 deletions lib/http_streaming_client/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -300,16 +300,24 @@ def request(method, uri, opts = {}, &block)

if !block_given? then
logger.debug "no block specified, returning chunk results and halting streaming response"
# flush any remaining uncompressed chunked decoder bytes into response by pushing a newline
decoder << "\n" if !response_compression and decoder.size > 0
return response
else
return if @interrupted and response_compression
return response if @interrupted
if @interrupted then
return if response_compression
# flush any remaining uncompressed chunked decoder bytes into response by pushing a newline
decoder << "\n" if !response_compression and decoder.size > 0
return response
end
end

end

logger.debug "socket EOF detected" if socket.eof?
raise ReconnectRequest if @reconnect_requested
# flush any remaining uncompressed chunked decoder bytes into response by pushing a newline
decoder << "\n" if !response_compression and decoder.size > 0
return response

else
Expand Down
2 changes: 1 addition & 1 deletion lib/http_streaming_client/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
###########################################################################

module HttpStreamingClient
VERSION = "0.9.5"
VERSION = "0.9.6"
end

0 comments on commit 8c7f7a3

Please sign in to comment.