Skip to content

Commit

Permalink
fix a bug in chunked http response regex (thanks to http://github.com…
Browse files Browse the repository at this point in the history
…/kevn for catching this)
  • Loading branch information
brianmario committed Jul 20, 2010
1 parent a6847b8 commit 363f533
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/yajl/http_stream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def self.request(method, uri, opts = {}, &block)
if block_given?
chunkLeft = 0
while !socket.eof? && (line = socket.gets)
break if line.match /0.*?\r\n/
break if line.match /^0.*?\r\n/
next if line == "\r\n"
size = line.hex
json = socket.read(size)
Expand Down

0 comments on commit 363f533

Please sign in to comment.