Python-发送自定义标头时,浏览器不会完成请求

Python-发送自定义标头时,浏览器不会完成请求,python,http-headers,Python,Http Headers,我目前正在制作一个依靠自定义标题的直播广播服务。但当我发送它们时,浏览器从不加载音频内容页。 以下是我发送的内容: # self.header is an `OrderedDict` # the header `HTTP/1.1 200 OK` is sent in the `HEADER` function self.header['Content-Type'] = 'audio/mpeg' self.header['XYZ-mount-point'] = config.MOUNT_

我目前正在制作一个依靠自定义标题的直播广播服务。但当我发送它们时,浏览器从不加载音频内容页。 以下是我发送的内容:

 # self.header is an `OrderedDict`
 # the header `HTTP/1.1 200 OK` is sent in the `HEADER` function

 self.header['Content-Type'] = 'audio/mpeg'
 self.header['XYZ-mount-point'] = config.MOUNT_POINT
 self.header['XYZ-artist'] = mp3.MP3(self.files[self.count]).artist()
 self.header['XYZ-album'] = mp3.MP3(self.files[self.count]).album()
 self.header['XYZ-title'] = mp3.MP3(self.files[self.count]).title()
 self.header['XYZ-duration'] = mp3.MP3(self.files[self.count]).duration()
 self.header['Connection'] = 'keep-alive'
 self.header['Content'] = buffer # raw audio data to be played
 header.HEADER(self.header, con) # sends the headers
如果我删除了XYZ头文件,一切都正常,发送自定义头文件是不可能的吗

以防万一:

def HEADER(HEADER, csock):
    string = ""
    csock.send("HTTP/1.1 200 OK\n")
    for k, v in HEADER.items():
            if not k == "Content":
                    string += '%s:%s\n' % (k, v)
            elif k == "Content":
                    string+="\n\n"+v
                    csock.send(string)