We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
SoundLoader can't determine file types for URL's with URL parameters in them.
Kivy currently can't load audio files from URL's that have URL parameters in them (For example `https://audio.example.com/get/test.wav?dl=true&token=9a8s76f9a876`).


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `kivy/core/audio/__init__.py`
Content:
```
1 '''
2 Audio
3 =====
4 
5 Load an audio sound and play it with::
6 
7     from kivy.core.audio import SoundLoader
8 
9     sound = SoundLoader.load('mytest.wav')
10     if sound:
11         print("Sound found at %s" % sound.source)
12         print("Sound is %.3f seconds" % sound.length)
13         sound.play()
14 
15 You should not use the Sound class directly. The class returned by
16 **SoundLoader.load** will be the best sound provider for that particular file
17 type, so it might return different Sound classes depending the file type.
18 
19 .. versionchanged:: 1.8.0
20     There is now 2 distinct Gstreamer implementation: one using Gi/Gst working
21     for both Python 2+3 with Gstreamer 1.0, and one using PyGST working
22     only for Python 2 + Gstreamer 0.10.
23     If you have issue with GStreamer, have a look at
24     :ref:`gstreamer-compatibility`
25 
26 .. note::
27 
28     Recording audio is not supported.
29 
30 '''
31 
32 __all__ = ('Sound', 'SoundLoader')
33 
34 from kivy.logger import Logger
35 from kivy.event import EventDispatcher
36 from kivy.core import core_register_libs
37 from kivy.compat import PY2
38 from kivy.resources import resource_find
39 from kivy.properties import StringProperty, NumericProperty, OptionProperty, \
40     AliasProperty, BooleanProperty
41 
42 
43 class SoundLoader:
44     '''Load a sound, using the best loader for the given file type.
45     '''
46 
47     _classes = []
48 
49     @staticmethod
50     def register(classobj):
51         '''Register a new class to load the sound.'''
52         Logger.debug('Audio: register %s' % classobj.__name__)
53         SoundLoader._classes.append(classobj)
54 
55     @staticmethod
56     def load(filename):
57         '''Load a sound, and return a Sound() instance.'''
58         rfn = resource_find(filename)
59         if rfn is not None:
60             filename = rfn
61         ext = filename.split('.')[-1].lower()
62         for classobj in SoundLoader._classes:
63             if ext in classobj.extensions():
64                 return classobj(source=filename)
65         Logger.warning('Audio: Unable to find a loader for <%s>' %
66                        filename)
67         return None
68 
69 
70 class Sound(EventDispatcher):
71     '''Represents a sound to play. This class is abstract, and cannot be used
72     directly.
73 
74     Use SoundLoader to load a sound.
75 
76     :Events:
77         `on_play` : None
78             Fired when the sound is played.
79         `on_stop` : None
80             Fired when the sound is stopped.
81     '''
82 
83     source = StringProperty(None)
84     '''Filename / source of your audio file.
85 
86     .. versionadded:: 1.3.0
87 
88     :attr:`source` is a :class:`~kivy.properties.StringProperty` that defaults
89     to None and is read-only. Use the :meth:`SoundLoader.load` for loading
90     audio.
91     '''
92 
93     volume = NumericProperty(1.)
94     '''Volume, in the range 0-1. 1 means full volume, 0 means mute.
95 
96     .. versionadded:: 1.3.0
97 
98     :attr:`volume` is a :class:`~kivy.properties.NumericProperty` and defaults
99     to 1.
100     '''
101 
102     state = OptionProperty('stop', options=('stop', 'play'))
103     '''State of the sound, one of 'stop' or 'play'.
104 
105     .. versionadded:: 1.3.0
106 
107     :attr:`state` is a read-only :class:`~kivy.properties.OptionProperty`.'''
108 
109     loop = BooleanProperty(False)
110     '''Set to True if the sound should automatically loop when it finishes.
111 
112     .. versionadded:: 1.8.0
113 
114     :attr:`loop` is a :class:`~kivy.properties.BooleanProperty` and defaults to
115     False.'''
116 
117     #
118     # deprecated
119     #
120     def _get_status(self):
121         return self.state
122     status = AliasProperty(_get_status, None, bind=('state', ))
123     '''
124     .. deprecated:: 1.3.0
125         Use :attr:`state` instead.
126     '''
127 
128     def _get_filename(self):
129         return self.source
130     filename = AliasProperty(_get_filename, None, bind=('source', ))
131     '''
132     .. deprecated:: 1.3.0
133         Use :attr:`source` instead.
134     '''
135 
136     __events__ = ('on_play', 'on_stop')
137 
138     def on_source(self, instance, filename):
139         self.unload()
140         if filename is None:
141             return
142         self.load()
143 
144     def get_pos(self):
145         '''
146         Returns the current position of the audio file.
147         Returns 0 if not playing.
148 
149         .. versionadded:: 1.4.1
150         '''
151         return 0
152 
153     def _get_length(self):
154         return 0
155 
156     length = property(lambda self: self._get_length(),
157                       doc='Get length of the sound (in seconds).')
158 
159     def load(self):
160         '''Load the file into memory.'''
161         pass
162 
163     def unload(self):
164         '''Unload the file from memory.'''
165         pass
166 
167     def play(self):
168         '''Play the file.'''
169         self.state = 'play'
170         self.dispatch('on_play')
171 
172     def stop(self):
173         '''Stop playback.'''
174         self.state = 'stop'
175         self.dispatch('on_stop')
176 
177     def seek(self, position):
178         '''Go to the <position> (in seconds).'''
179         pass
180 
181     def on_play(self):
182         pass
183 
184     def on_stop(self):
185         pass
186 
187 
188 # Little trick here, don't activate gstreamer on window
189 # seem to have lot of crackle or something...
190 audio_libs = []
191 
192 # from now on, prefer our gstplayer instead of gi/pygst.
193 try:
194     from kivy.lib.gstplayer import GstPlayer  # NOQA
195     audio_libs += [('gstplayer', 'audio_gstplayer')]
196 except ImportError:
197     #audio_libs += [('gi', 'audio_gi')]
198     if PY2:
199         audio_libs += [('pygst', 'audio_pygst')]
200 audio_libs += [('sdl', 'audio_sdl')]
201 audio_libs += [('pygame', 'audio_pygame')]
202 
203 core_register_libs('audio', audio_libs)
204
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/kivy/core/audio/__init__.py b/kivy/core/audio/__init__.py
--- a/kivy/core/audio/__init__.py
+++ b/kivy/core/audio/__init__.py
@@ -59,6 +59,8 @@
         if rfn is not None:
             filename = rfn
         ext = filename.split('.')[-1].lower()
+        if '?' in ext:
+            ext = ext.split('?')[0]
         for classobj in SoundLoader._classes:
             if ext in classobj.extensions():
                 return classobj(source=filename)

{"golden_diff": "diff --git a/kivy/core/audio/__init__.py b/kivy/core/audio/__init__.py\n--- a/kivy/core/audio/__init__.py\n+++ b/kivy/core/audio/__init__.py\n@@ -59,6 +59,8 @@\n         if rfn is not None:\n             filename = rfn\n         ext = filename.split('.')[-1].lower()\n+        if '?' in ext:\n+            ext = ext.split('?')[0]\n         for classobj in SoundLoader._classes:\n             if ext in classobj.extensions():\n                 return classobj(source=filename)\n", "issue": "SoundLoader can't determine file types for URL's with URL parameters in them.\nKivy currently can't load audio files from URL's that have URL parameters in them (For example `https://audio.example.com/get/test.wav?dl=true&token=9a8s76f9a876`).\n\n", "before_files": [{"content": "'''\nAudio\n=====\n\nLoad an audio sound and play it with::\n\n    from kivy.core.audio import SoundLoader\n\n    sound = SoundLoader.load('mytest.wav')\n    if sound:\n        print(\"Sound found at %s\" % sound.source)\n        print(\"Sound is %.3f seconds\" % sound.length)\n        sound.play()\n\nYou should not use the Sound class directly. The class returned by\n**SoundLoader.load** will be the best sound provider for that particular file\ntype, so it might return different Sound classes depending the file type.\n\n.. versionchanged:: 1.8.0\n    There is now 2 distinct Gstreamer implementation: one using Gi/Gst working\n    for both Python 2+3 with Gstreamer 1.0, and one using PyGST working\n    only for Python 2 + Gstreamer 0.10.\n    If you have issue with GStreamer, have a look at\n    :ref:`gstreamer-compatibility`\n\n.. note::\n\n    Recording audio is not supported.\n\n'''\n\n__all__ = ('Sound', 'SoundLoader')\n\nfrom kivy.logger import Logger\nfrom kivy.event import EventDispatcher\nfrom kivy.core import core_register_libs\nfrom kivy.compat import PY2\nfrom kivy.resources import resource_find\nfrom kivy.properties import StringProperty, NumericProperty, OptionProperty, \\\n    AliasProperty, BooleanProperty\n\n\nclass SoundLoader:\n    '''Load a sound, using the best loader for the given file type.\n    '''\n\n    _classes = []\n\n    @staticmethod\n    def register(classobj):\n        '''Register a new class to load the sound.'''\n        Logger.debug('Audio: register %s' % classobj.__name__)\n        SoundLoader._classes.append(classobj)\n\n    @staticmethod\n    def load(filename):\n        '''Load a sound, and return a Sound() instance.'''\n        rfn = resource_find(filename)\n        if rfn is not None:\n            filename = rfn\n        ext = filename.split('.')[-1].lower()\n        for classobj in SoundLoader._classes:\n            if ext in classobj.extensions():\n                return classobj(source=filename)\n        Logger.warning('Audio: Unable to find a loader for <%s>' %\n                       filename)\n        return None\n\n\nclass Sound(EventDispatcher):\n    '''Represents a sound to play. This class is abstract, and cannot be used\n    directly.\n\n    Use SoundLoader to load a sound.\n\n    :Events:\n        `on_play` : None\n            Fired when the sound is played.\n        `on_stop` : None\n            Fired when the sound is stopped.\n    '''\n\n    source = StringProperty(None)\n    '''Filename / source of your audio file.\n\n    .. versionadded:: 1.3.0\n\n    :attr:`source` is a :class:`~kivy.properties.StringProperty` that defaults\n    to None and is read-only. Use the :meth:`SoundLoader.load` for loading\n    audio.\n    '''\n\n    volume = NumericProperty(1.)\n    '''Volume, in the range 0-1. 1 means full volume, 0 means mute.\n\n    .. versionadded:: 1.3.0\n\n    :attr:`volume` is a :class:`~kivy.properties.NumericProperty` and defaults\n    to 1.\n    '''\n\n    state = OptionProperty('stop', options=('stop', 'play'))\n    '''State of the sound, one of 'stop' or 'play'.\n\n    .. versionadded:: 1.3.0\n\n    :attr:`state` is a read-only :class:`~kivy.properties.OptionProperty`.'''\n\n    loop = BooleanProperty(False)\n    '''Set to True if the sound should automatically loop when it finishes.\n\n    .. versionadded:: 1.8.0\n\n    :attr:`loop` is a :class:`~kivy.properties.BooleanProperty` and defaults to\n    False.'''\n\n    #\n    # deprecated\n    #\n    def _get_status(self):\n        return self.state\n    status = AliasProperty(_get_status, None, bind=('state', ))\n    '''\n    .. deprecated:: 1.3.0\n        Use :attr:`state` instead.\n    '''\n\n    def _get_filename(self):\n        return self.source\n    filename = AliasProperty(_get_filename, None, bind=('source', ))\n    '''\n    .. deprecated:: 1.3.0\n        Use :attr:`source` instead.\n    '''\n\n    __events__ = ('on_play', 'on_stop')\n\n    def on_source(self, instance, filename):\n        self.unload()\n        if filename is None:\n            return\n        self.load()\n\n    def get_pos(self):\n        '''\n        Returns the current position of the audio file.\n        Returns 0 if not playing.\n\n        .. versionadded:: 1.4.1\n        '''\n        return 0\n\n    def _get_length(self):\n        return 0\n\n    length = property(lambda self: self._get_length(),\n                      doc='Get length of the sound (in seconds).')\n\n    def load(self):\n        '''Load the file into memory.'''\n        pass\n\n    def unload(self):\n        '''Unload the file from memory.'''\n        pass\n\n    def play(self):\n        '''Play the file.'''\n        self.state = 'play'\n        self.dispatch('on_play')\n\n    def stop(self):\n        '''Stop playback.'''\n        self.state = 'stop'\n        self.dispatch('on_stop')\n\n    def seek(self, position):\n        '''Go to the <position> (in seconds).'''\n        pass\n\n    def on_play(self):\n        pass\n\n    def on_stop(self):\n        pass\n\n\n# Little trick here, don't activate gstreamer on window\n# seem to have lot of crackle or something...\naudio_libs = []\n\n# from now on, prefer our gstplayer instead of gi/pygst.\ntry:\n    from kivy.lib.gstplayer import GstPlayer  # NOQA\n    audio_libs += [('gstplayer', 'audio_gstplayer')]\nexcept ImportError:\n    #audio_libs += [('gi', 'audio_gi')]\n    if PY2:\n        audio_libs += [('pygst', 'audio_pygst')]\naudio_libs += [('sdl', 'audio_sdl')]\naudio_libs += [('pygame', 'audio_pygame')]\n\ncore_register_libs('audio', audio_libs)\n", "path": "kivy/core/audio/__init__.py"}], "after_files": [{"content": "'''\nAudio\n=====\n\nLoad an audio sound and play it with::\n\n    from kivy.core.audio import SoundLoader\n\n    sound = SoundLoader.load('mytest.wav')\n    if sound:\n        print(\"Sound found at %s\" % sound.source)\n        print(\"Sound is %.3f seconds\" % sound.length)\n        sound.play()\n\nYou should not use the Sound class directly. The class returned by\n**SoundLoader.load** will be the best sound provider for that particular file\ntype, so it might return different Sound classes depending the file type.\n\n.. versionchanged:: 1.8.0\n    There is now 2 distinct Gstreamer implementation: one using Gi/Gst working\n    for both Python 2+3 with Gstreamer 1.0, and one using PyGST working\n    only for Python 2 + Gstreamer 0.10.\n    If you have issue with GStreamer, have a look at\n    :ref:`gstreamer-compatibility`\n\n.. note::\n\n    Recording audio is not supported.\n\n'''\n\n__all__ = ('Sound', 'SoundLoader')\n\nfrom kivy.logger import Logger\nfrom kivy.event import EventDispatcher\nfrom kivy.core import core_register_libs\nfrom kivy.compat import PY2\nfrom kivy.resources import resource_find\nfrom kivy.properties import StringProperty, NumericProperty, OptionProperty, \\\n    AliasProperty, BooleanProperty\n\n\nclass SoundLoader:\n    '''Load a sound, using the best loader for the given file type.\n    '''\n\n    _classes = []\n\n    @staticmethod\n    def register(classobj):\n        '''Register a new class to load the sound.'''\n        Logger.debug('Audio: register %s' % classobj.__name__)\n        SoundLoader._classes.append(classobj)\n\n    @staticmethod\n    def load(filename):\n        '''Load a sound, and return a Sound() instance.'''\n        rfn = resource_find(filename)\n        if rfn is not None:\n            filename = rfn\n        ext = filename.split('.')[-1].lower()\n        if '?' in ext:\n            ext = ext.split('?')[0]\n        for classobj in SoundLoader._classes:\n            if ext in classobj.extensions():\n                return classobj(source=filename)\n        Logger.warning('Audio: Unable to find a loader for <%s>' %\n                       filename)\n        return None\n\n\nclass Sound(EventDispatcher):\n    '''Represents a sound to play. This class is abstract, and cannot be used\n    directly.\n\n    Use SoundLoader to load a sound.\n\n    :Events:\n        `on_play` : None\n            Fired when the sound is played.\n        `on_stop` : None\n            Fired when the sound is stopped.\n    '''\n\n    source = StringProperty(None)\n    '''Filename / source of your audio file.\n\n    .. versionadded:: 1.3.0\n\n    :attr:`source` is a :class:`~kivy.properties.StringProperty` that defaults\n    to None and is read-only. Use the :meth:`SoundLoader.load` for loading\n    audio.\n    '''\n\n    volume = NumericProperty(1.)\n    '''Volume, in the range 0-1. 1 means full volume, 0 means mute.\n\n    .. versionadded:: 1.3.0\n\n    :attr:`volume` is a :class:`~kivy.properties.NumericProperty` and defaults\n    to 1.\n    '''\n\n    state = OptionProperty('stop', options=('stop', 'play'))\n    '''State of the sound, one of 'stop' or 'play'.\n\n    .. versionadded:: 1.3.0\n\n    :attr:`state` is a read-only :class:`~kivy.properties.OptionProperty`.'''\n\n    loop = BooleanProperty(False)\n    '''Set to True if the sound should automatically loop when it finishes.\n\n    .. versionadded:: 1.8.0\n\n    :attr:`loop` is a :class:`~kivy.properties.BooleanProperty` and defaults to\n    False.'''\n\n    #\n    # deprecated\n    #\n    def _get_status(self):\n        return self.state\n    status = AliasProperty(_get_status, None, bind=('state', ))\n    '''\n    .. deprecated:: 1.3.0\n        Use :attr:`state` instead.\n    '''\n\n    def _get_filename(self):\n        return self.source\n    filename = AliasProperty(_get_filename, None, bind=('source', ))\n    '''\n    .. deprecated:: 1.3.0\n        Use :attr:`source` instead.\n    '''\n\n    __events__ = ('on_play', 'on_stop')\n\n    def on_source(self, instance, filename):\n        self.unload()\n        if filename is None:\n            return\n        self.load()\n\n    def get_pos(self):\n        '''\n        Returns the current position of the audio file.\n        Returns 0 if not playing.\n\n        .. versionadded:: 1.4.1\n        '''\n        return 0\n\n    def _get_length(self):\n        return 0\n\n    length = property(lambda self: self._get_length(),\n                      doc='Get length of the sound (in seconds).')\n\n    def load(self):\n        '''Load the file into memory.'''\n        pass\n\n    def unload(self):\n        '''Unload the file from memory.'''\n        pass\n\n    def play(self):\n        '''Play the file.'''\n        self.state = 'play'\n        self.dispatch('on_play')\n\n    def stop(self):\n        '''Stop playback.'''\n        self.state = 'stop'\n        self.dispatch('on_stop')\n\n    def seek(self, position):\n        '''Go to the <position> (in seconds).'''\n        pass\n\n    def on_play(self):\n        pass\n\n    def on_stop(self):\n        pass\n\n\n# Little trick here, don't activate gstreamer on window\n# seem to have lot of crackle or something...\naudio_libs = []\n\n# from now on, prefer our gstplayer instead of gi/pygst.\ntry:\n    from kivy.lib.gstplayer import GstPlayer  # NOQA\n    audio_libs += [('gstplayer', 'audio_gstplayer')]\nexcept ImportError:\n    #audio_libs += [('gi', 'audio_gi')]\n    if PY2:\n        audio_libs += [('pygst', 'audio_pygst')]\naudio_libs += [('sdl', 'audio_sdl')]\naudio_libs += [('pygame', 'audio_pygame')]\n\ncore_register_libs('audio', audio_libs)\n", "path": "kivy/core/audio/__init__.py"}]}