webdevreloader 0.5 → 0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/reloader +5 -2
- metadata +2 -2
data/bin/reloader
CHANGED
@@ -313,7 +313,7 @@ class Reloader
|
|
313
313
|
def read_http_something(initial_data, io)
|
314
314
|
out = initial_data.dup
|
315
315
|
begin
|
316
|
-
io.readpartial(16384
|
316
|
+
out << io.readpartial(16384)
|
317
317
|
p_log :http, "got out: ", out
|
318
318
|
p_log :http_request, "req: ", out.split("\n").first.strip
|
319
319
|
end while out !~ HTTP_END_REQUEST_RE
|
@@ -364,16 +364,19 @@ class Reloader
|
|
364
364
|
out[length..-1].dup]
|
365
365
|
end
|
366
366
|
|
367
|
+
p_log :http, "out before connection close loop:", out
|
367
368
|
while true
|
368
369
|
begin
|
369
|
-
io.readpartial(16384
|
370
|
+
out << io.readpartial(16384)
|
370
371
|
rescue EOFError
|
372
|
+
p_log :http, "breaking out out close await loop", out
|
371
373
|
break
|
372
374
|
end
|
373
375
|
end
|
374
376
|
|
375
377
|
[out, ""]
|
376
378
|
rescue EOFError
|
379
|
+
p_log :http, "EOFError: #{out.size}, #{initial_data.size}"
|
377
380
|
return ["", out] if out.size == initial_data.size
|
378
381
|
raise "Partial request or response"
|
379
382
|
end
|