[haiku-commits] Re: haiku: hrev45267 - src/kits/network/libnetapi headers/os/net

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 11 Feb 2013 09:09:29 +0100

Am 10/02/2013 21:46, schrieb hamishm53@xxxxxxxxx:
2675e31: BUrlRequest: fix various issues

BTW what is the general feeling towards BUrlRequest vs. BURLRequest?
We have both styles in our repository, but we should agree on a single style for the things we add to the Be API.

AFAICT the original API is using the upper case style, ie. BGLWindow, not sure if there are contradicting examples.

FWIW, I prefer BURLRequest, and I could even live with things like BURL :-)

+status_t
+BUrlRequest::_SetupProtocol()
+{
+       // TODO: instanciate the correct BUrlProtocol w/ the services roster
+       delete fUrlProtocol;
+       fUrlProtocol = NULL;
+
+       if (fUrl.Protocol() == "http")
+               fUrlProtocol = new(std::nothrow) BUrlProtocolHttp(fUrl, false, 
"HTTP",
+                       fListener, fContext, &fResult);
+       else if (fUrl.Protocol() == "https")
+               fUrlProtocol = new(std::nothrow) BUrlProtocolHttp(fUrl, true, 
"HTTPS",
+                       fListener, fContext, &fResult);

Those are multiline statements, and should go into their own block.

Bye,
   Axel.


Other related posts: