[Red5devs] [PATCH 03 of 15] add response body to error message
Mondain
mondain at gmail.com
Tue Aug 26 15:49:41 PDT 2008
Added
On Tue, Aug 26, 2008 at 11:03 AM, mabrek <mabrek at gmail.com> wrote:
> diff -r fea37acdcd8c -r 3c83f9f381b6
> src/org/red5/server/net/rtmpt/RTMPTClientConnector.java
> --- a/src/org/red5/server/net/rtmpt/RTMPTClientConnector.java Tue Jul 15
> 13:16:58 2008 +0400
> +++ b/src/org/red5/server/net/rtmpt/RTMPTClientConnector.java Tue Jul 15
> 15:58:50 2008 +0400
> @@ -208,7 +208,15 @@
>
> private void checkResponseCode(HttpMethod method) {
> if (method.getStatusCode() != HttpStatus.SC_OK) {
> - throw new RuntimeException("Bad HTTP status
> returned: " + method.getStatusLine());
> + try {
> + String body =
> method.getResponseBodyAsString();
> + throw new RuntimeException("Bad HTTP status
> returned, line: "
> + + method.getStatusLine() +
> "; body: " + body);
> + } catch (IOException e) {
> + throw new RuntimeException("Bad HTTP status
> returned, line: "
> + + method.getStatusLine()
> + + "; in addition
> IOException occured on reading body", e);
> + }
> }
> }
>
>
>
>
> _______________________________________________
> Red5devs mailing list
> Red5devs at osflash.org
> http://osflash.org/mailman/listinfo/red5devs_osflash.org
>
--
http://gregoire.org/
http://osflash.org/red5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5devs_osflash.org/attachments/20080826/c7a26c04/attachment.html
More information about the Red5devs
mailing list