Gisle Aas wrote: > > The subroutine Net::HTTP::Methods::write_request calls print, but > > doesn't check the return value. > > > > It's a non-blocking socket, so it's quite normal for the print to do a > > "short write" if the string is very large -- larger than the socket > > transmit buffer. > > I would belive that print should be responsible for the handing short > writes itself. On what system are you running and what perl version > are you using?
Red Hat 9, perl-5.8.0-88.3. print normally does handly short writes and keep writing until it's done the whole string. However, it will stop when it gets an error code, and it does: EAGAIN because the socket transmit buffer is full and it's non-blocking. > What could make sense to to rewrite Net::HTTP so that it use syswrite > all over the place instead. With it we can easily handle short writes > outself. It's not the short writes as such, it's the EAGAINs. -- Jamie