It would make sense if we do this as: sendError(404, "Thread dump not
supported"). But, I assume that thread dump is used mainly by developers
not monitoring tools so, plain text is better than annoying 404. But if 404
is "better taste" here, I'm fine.


On Fri, Feb 7, 2014 at 12:22 AM, Jochen Schalanda
<notifications@github.com>wrote:

> In
> metrics-servlets/src/main/java/com/codahale/metrics/servlets/ThreadDumpServlet.java:
>
> >      }
> >
> >      @Override
> >      protected void doGet(HttpServletRequest req,
> > -                         HttpServletResponse resp) throws ServletException, IOException {
> > +            HttpServletResponse resp) throws ServletException, IOException {
> >          resp.setStatus(HttpServletResponse.SC_OK);
>
> Just a thought, but responding with HTTP status 404 (Not found) might be
> more sensible in case the platform doesn't support getting a thread dump.
>
>    -
>    http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletResponse.html#SC_NOT_FOUND
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/dropwizard/metrics/pull/522/files#r9523995>
> .
>



-- 
*Bart Prokop*
tel. +48 509 258 502
LinkedIn: http://pl.linkedin.com/in/bartprokop

My PGP/GPG public key:
http://bart.prokop.name/gpg/gpg-2014-pub-key-prokop-bart.asc, fingerprint:
85AC B7A4 5E9A 73D4 DDA0  38A7 244E A73A C835 58F3. I'm more than happy to
accept PGP encrypted e-mails.

This e-mail is intended solely for the addressee(s) and contains
confidential information. Unauthorized distribution, modification or
disclosure of its contents is unlawful. If you have received this e-mail in
error, please notify the sender immediately by return e-mail. Please then
delete the e-mail from your system and do not copy it or disclose its
contents to any person. Email transmission cannot be guaranteed to be
secure or error free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The sender
therefore does not accept liability for any errors or omissions in the
contents of this message which arise as a result of email transmission.
Information, opinions or conclusions contained in this message that do not
relate to the official business of the senders employer or principal will
be understood as neither given nor endorsed by it.