>
> Hi,
>
>             I am writing this mail to clear about my approach of solving
> patch 1. I had made changes in the 'raw' function so that it returns the
> actual content except if content-type is html. Earlier, I was doing it
> using request_wants_json function (/datagrepper/util.py) but it matches for
> header type of either application/json or text/html only. In that case, if
> header type other than these two it returns value error. I came to know
> that there are 17 mimetypes  through this link<https://github.com/nicolaiarocci/flask-mimerender/blob/master/src/flaskmimerender.py>.
> And yeah, request_wants_json is also working. I tried for different
> mimetype using curl -H accept:text/html http://localhost:5000/raw<http://localhost:5000/raw.> by
> changing the accept header.So, I'll have to add all these mimetypes in the
> best-match in request_wants_json function and then have to set their
> priority.
>

  To continue with above approach either we should add different mimetypes
so that it can handle the accept header or browser should provide some
mechanism where it asks from user about the content type.

>
> That is why, i adopted another approach i.e. first checking the header and
> content type and if it is other than text/html, it returns the actual
> content. (simple one if/else block).
>


> -Charul
>


On Sun, Oct 27, 2013 at 2:47 AM, Pierre-Yves Chibon <
notifications@github.com> wrote:

> In datagrepper/app.py:
>
> > @@ -300,19 +300,30 @@ def raw():
> >          status = 500
> >
> >      body = fedmsg.encoding.dumps(output)
> > -
> > +	
>
> Well, do you see the green box near the sign '+' here:
> https://github.com/fedora-infra/datagrepper/pull/80/files#diff-0a10d93b46f17a8b4b29aa1e41ae602aR303?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/fedora-infra/datagrepper/pull/80/files#r7235921>
> .
>