tcalmant / ipopo

iPOPO: a Service-Oriented Component Model for Python
https://ipopo.readthedocs.io/
Apache License 2.0
69 stars 28 forks source link

Content-type sent #43

Closed gattazr closed 9 years ago

gattazr commented 9 years ago

In pelix.http.__init__.py , if no meme-type is given to the function send_content, the content-type of the response will always be sent with the value text/html.

def send_content(self, http_code, content, mime_type="text/html", http_message=None, content_length=-1):
    ...
    self.set_response(http_code, http_message)
    if mime_type:
        self.set_header("content-type", mime_type)
    ...

So if it was set prior to the call of that function, the value will be overriden.