Skip Menu |

This queue is for tickets about the Net-Flowdock-Stream CPAN distribution.

Report information
The Basics
Id: 76032
Status: new
Priority: 0/
Queue: Net-Flowdock-Stream

People
Owner: Nobody in particular
Requestors: oleg [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.01
Fixed in: (no value)



Subject: Not safe headers reading
It seems for me, that lines below may cause potential problem. --------------------------------- $s->write_request( GET => "/flows?filter=$flows" => Authorization => 'Basic ' . MIME::Base64::encode($auth), Accept => 'application/json', ); my ($code, $message, %headers) = $s->read_response_headers; die "Unable to connect: $message" unless $code == 200; --------------------------------- You are trying to read headers only once. But read_response_headers() may return empty list (as documented) if full header not yet received. So, it will be better to check return value and try again when socket will become ready for reading.