[haiku-bugs] [Haiku] #16155: BHttpRequest doesn't check for connection before resolving

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Wed, 27 May 2020 17:16:32 -0000

#16155: BHttpRequest doesn't check for connection before resolving
-------------------------------------+-----------------------------
 Reporter:  fatigatti                |       Owner:  axeld
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Unscheduled
Component:  Network & Internet/IPv4  |     Version:  R1/Development
 Keywords:  BHttpRequest NetworkKit  |  Blocked By:
 Blocking:                           |    Platform:  All
-------------------------------------+-----------------------------
 Currently Haiku's BHttpRequest is not able to check for connection on a
 specified IP address/port pair before actually resolving the hostname to
 that pair. That means, if the first server in the DNS response is down or
 has its port closed for some reason, the request will simply fail.

 I've run into this while making some small improvements for the
 StreamRadio app last year. Basically, a stream address would resolve to
 two different IPs, and one of them wasn't working. Instead of trying to
 connect to the next one, BHttpRequest would simply fail. I've tried the
 same stream on other software (VLC on Windows) and it worked every time.

 I asked for advice, and while some people thought that the app itself
 should take care of this situation, the major part of the responses said
 that BHttpRequest should handle this better, and @pulkomandy asked me for
 a bug report.

 I did an ugly hack on StreamRadio to make it work, but it doesn't handle
 HTTPS right. Besides, every application using BHttpRequest will benefit of
 this (I don't know how WebPositive handles this at the moment, for
 example).
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/16155>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: