Bug 235460

Summary: phttpget: Lacks retry and retry_timeout options
Product: Base System Reporter: Ricardo Fraile <rfraile>
Component: binAssignee: freebsd-bugs mailing list <bugs>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235538

Description Ricardo Fraile 2019-02-03 13:02:11 UTC
phttpget can be tuned with the following enviromental variables:

HTTP_PROXY
HTTP_PROXY_AUTH
HTTP_USER_AGENT
HTTP_TIMEOUT

It would be nice to have two more:

CONN_RETRY
CONN_TIMEOUT

The HTTP_TIMEOUT is only applied before the connection, so, if for example the dns fails, that request fails with a "phttpget: Could not connect to x.x.x.x".

It would be nice to have the timeout applied at the connection level, and, by the way, a retry to it. That can be solve some issues with freebsd-update.


Thanks,
Comment 1 Ricardo Fraile 2019-02-03 22:19:42 UTC
Sorry, my previous comment has a typo:

The HTTP_TIMEOUT only applies **after** the tcp connection to the remote server. So, if for example the dns fails, the network link have connectivity problems or something related, that request fails quickly with a "phttpget: Could not connect to x.x.x.x" without waiting for the timeout.

It would be nice to have the waiting time applied at the connection level and, by the way, a retry to it. That can solve some issues with freebsd-update and make it more resilience.

Thanks,