title: C/C++ LibVLC HTTP access denied on libvlc_new_media_location()
body: <p>Writing C/C++ code for media server and media client. The Media server broadcasts on various ports and can be received by VLC NetworkStreaming; but my client receives 'HTTP ACCESS ERROR'.</p>
  <p>OS: Fedora 30</p>
  <pre><code>[00007ff044001610] access stream error: HTTP connection failure
  [00007ff044001610] http stream error: cannot connect to 127.0.0.1:8900
  
  int main(int argc, char* argv[]) 
  {  
      libvlc_instance_t * inst;  
      libvlc_media_player_t *mp;  
       libvlc_media_t *m;  
       /* Load the VLC engine */
       inst = libvlc_new (0, NULL);
       /* Create a new item */
       m = libvlc_media_new_location (inst,&quot;http://127.0.0.1:8900/stream&quot;);
      
      /* Create a media player playing environement */
       mp = libvlc_media_player_new_from_media (m);
   
       /* No need to keep the media now */
       libvlc_media_release (m);
       /* play the media_player */
       libvlc_media_player_play (mp);
  
       /* Stop playing */
       libvlc_media_player_stop (mp);
  
       /* Free the media_player */
       libvlc_media_player_release (mp);
       libvlc_release (inst);
  
       return 0;
   }
  </code></pre>
  <p>2020-07-23 code verbose output</p>
  <pre><code>    [0000000001448040] main libvlc debug: VLC media player - 3.0.11 Vetinari
      [0000000001448040] main libvlc debug: Copyright © 1996-2020 the VideoLAN team
      [0000000001448040] main libvlc debug: revision 3.0.11-0-gdc0c5ced72
      [0000000001448040] main libvlc debug: configured with ./configure  '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' 
      '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' 
      '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' 
      '--disable-optimizations' '--disable-silent-rules' '--with-default-font=/usr/share/fonts/dejavu/DejaVuSans.ttf' '--with-default-font-family=DejaVuSans' 
      '--with-default-monospace-font=/usr/share/fonts/dejavu/DejaVuSansMono.ttf' '--with-default-monospace-font-family=DejaVuSansMono' '--with-kde-solid=no' '--with-pic' 
      '--disable-rpath' '--with-binary-version=3.0.11' '--enable-lua' '--enable-live555' '--enable-sftp' '--enable-aom' '--enable-dav1d' '--enable-faad' '--enable-twolame' 
      '--enable-realrtsp' '--enable-flac' '--enable-tremor' '--enable-speex' '--enable-theora' '--enable-libass' '--enable-shout' '--enable-wayland' '--enable-xcb' 
      '--enable-xvideo' '--enable-svg' '--enable-aa' '--enable-caca' '--enable-jack' '--enable-pulse' '--enable-ncurses' '--enable-lirc' 'build_alias=x86_64-redhat-linux-gnu' 
      'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions 
      -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 
      -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'LDFLAGS=-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now 
      -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' 'CXXFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions 
      -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 
      -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'LT_SYS_LIBRARY_PATH=/usr/lib64:' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'
  </code></pre>
  <p>2020-07-23 verbose output</p>
  <pre><code>    [0000000001448040] main libvlc debug: searching plug-in modules
      [0000000001448040] main libvlc debug: loading plugins cache file /usr/lib64/vlc/plugins/plugins.dat
      [0000000001448040] main libvlc debug: recursively browsing `/usr/lib64/vlc/plugins'
      [0000000001448040] main libvlc debug: plug-ins loaded: 532 modules
      [0000000001448390] main logger debug: looking for logger module matching &quot;any&quot;: 4 candidates
      [0000000001448390] main logger debug: using logger module &quot;console&quot;
      [0000000001448040] main libvlc debug: translation test: code is &quot;C&quot;
  </code></pre>
  <p>2020-07-23 verbose output cont</p>
  <pre><code>    [00000000014e9c90] main keystore debug: using keystore module &quot;memory&quot;
      [0000000001448040] main libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX FPU 
      [00000000014e4d20] main generic debug: creating audio output
      [00000000014ebe40] main audio output debug: looking for audio output module matching &quot;any&quot;: 6 candidates
      [00000000014ebe40] vlcpulse audio output debug: using library version 13.99.0
      [00000000014ebe40] vlcpulse audio output debug:  (compiled with version 13.99.0, protocol 33)
      [00000000014ebe40] vlcpulse audio output debug: connected locally to /run/user/1000/pulse/native as client #666
      [00000000014ebe40] vlcpulse audio output debug: using protocol 33, server protocol 33
      [00000000014ebe40] pulse audio output debug: adding sink 0: alsa_output.pci-0000_00_1b.0.analog-stereo (Built-in Audio Analog Stereo)
      [00000000014ebe40] main audio output debug: using audio output module &quot;pulse&quot;
      [00000000014e4d20] main generic debug: keeping audio output
      [00000000014fe050] main input debug: Creating an input for 'stream'
      [00000000014fe050] main input debug: using timeshift granularity of 50 MiB
      [00000000014fe050] main input debug: using default timeshift path
      [00000000014fe050] main input debug: `http://127.0.0.1:8900/stream' gives access `http' demux `any' path `127.0.0.1:8900/stream'
      [00007faaac000fa0] main input source debug: creating demux: access='http' demux='any' location='127.0.0.1:8900/stream' file='(null)'
  </code></pre>
  <p>2020-07-23 verbose output</p>
  <pre><code>    [00007faaac001130] main demux debug: looking for access_demux module matching &quot;http&quot;: 21 candidates
      [00007faaac001130] main demux debug: no access_demux modules matched
      [00007faaac0015f0] main stream debug: creating access: http://127.0.0.1:8900/stream
      [00007faaac0015f0] main stream debug: looking for access module matching &quot;http&quot;: 30 candidates
      [00007faaac0015f0] http stream debug: resolving 127.0.0.1 ...
      [00007faaac0015f0] http stream debug: outgoing request:
  </code></pre>
  <p>2020-07-23 verbose output</p>
  <pre><code>    GET /stream HTTP/1.1
      Host: 127.0.0.1:8900
      Accept: */*
      Accept-Language: en_US
      User-Agent: VLC/3.0.11 LibVLC/3.0.11
      Range: bytes=0-
      [00007faaac0015f0] http stream debug: connection failed
      [00007faaac0015f0] access stream error: HTTP connection failure
      [00007faaac0015f0] http stream debug: querying proxy for http://127.0.0.1:8900/stream
      [00007faaac0015f0] http stream debug: no proxy
      [00007faaac0015f0] http stream debug: http: server='127.0.0.1' port=8900 file='/stream'
      [00007faaac0015f0] main stream debug: net: connecting to 127.0.0.1 port 8900
      [00007faaac0015f0] http stream error: cannot connect to 127.0.0.1:8900
      [00007faaac0015f0] main stream debug: no access modules matched
      [00000000014ebe40] main audio output debug: removing module &quot;pulse&quot;
      [0000000001448040] main libvlc debug: exiting
      [0000000001448040] main libvlc debug: no exit handler
      [0000000001448040] main libvlc debug: removing all interfaces
      [00000000014e9c90] main keystore debug: removing module &quot;memory&quot;
  </code></pre>