You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Brian Eaton (JIRA)" <ji...@apache.org> on 2008/05/26 18:55:56 UTC

[jira] Created: (SHINDIG-309) return HTTP errors from HttpFetcher subclasses

return HTTP errors from HttpFetcher subclasses
----------------------------------------------

                 Key: SHINDIG-309
                 URL: https://issues.apache.org/jira/browse/SHINDIG-309
             Project: Shindig
          Issue Type: Bug
            Reporter: Brian Eaton
         Attachments: httperrors.patch

The current implementation of BasicHttpFetcher fails if a server returns a 40x or 50x return code.  An exception gets thrown, which in turn is turned into a hard coded HTTP 500 response.

This patch tweaks the code to allow the real response to be returned.

This is prep work for supporting the OAuth problem reporting extension, to be shortly followed by the Scalable OAuth extension.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-309) return HTTP errors from HttpFetcher subclasses

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Eaton updated SHINDIG-309:
--------------------------------

    Attachment: httperrors2.patch

The patch again, but this time with the OAuth change stripped out.  I'll open up another jira issue for that.

> return HTTP errors from HttpFetcher subclasses
> ----------------------------------------------
>
>                 Key: SHINDIG-309
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-309
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: httperrors2.patch
>
>
> The current implementation of BasicHttpFetcher fails if a server returns a 40x or 50x return code.  An exception gets thrown, which in turn is turned into a hard coded HTTP 500 response.
> This patch tweaks the code to allow the real response to be returned.
> This is prep work for supporting the OAuth problem reporting extension, to be shortly followed by the Scalable OAuth extension.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-309) return HTTP errors from HttpFetcher subclasses

Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603211#action_12603211 ] 

Kevin Brown commented on SHINDIG-309:
-------------------------------------

Ok, this looks good as well, though it looks like there are some missing test cases (there are comments to this effect). I'd prefer that the tests be added instead of the comments :)

> return HTTP errors from HttpFetcher subclasses
> ----------------------------------------------
>
>                 Key: SHINDIG-309
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-309
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: httperrors2.patch
>
>
> The current implementation of BasicHttpFetcher fails if a server returns a 40x or 50x return code.  An exception gets thrown, which in turn is turned into a hard coded HTTP 500 response.
> This patch tweaks the code to allow the real response to be returned.
> This is prep work for supporting the OAuth problem reporting extension, to be shortly followed by the Scalable OAuth extension.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-309) return HTTP errors from HttpFetcher subclasses

Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599919#action_12599919 ] 

Kevin Brown commented on SHINDIG-309:
-------------------------------------

I really think both the OAuth and signed fetch need to be distinct interfaces to handle their specific needs. The current code is kind of convoluted.

The proposed interfaces that I've got in my workspace are:

public interface OAuthFetcher {
  public OAuthResponse fetch(OAuthRequest request) throws OAuthException
}

OAuthRequest extends HttpRequest and includes oauth state and the security token. OAuthResponse extends HttpResponse and includes appropriate response data there as well.

These are largely mirrored for Signed requests, with the parameters on SignedRequest being signing specific (sign viewer, sign owner).



> return HTTP errors from HttpFetcher subclasses
> ----------------------------------------------
>
>                 Key: SHINDIG-309
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-309
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: httperrors.patch
>
>
> The current implementation of BasicHttpFetcher fails if a server returns a 40x or 50x return code.  An exception gets thrown, which in turn is turned into a hard coded HTTP 500 response.
> This patch tweaks the code to allow the real response to be returned.
> This is prep work for supporting the OAuth problem reporting extension, to be shortly followed by the Scalable OAuth extension.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-309) return HTTP errors from HttpFetcher subclasses

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Eaton updated SHINDIG-309:
--------------------------------

    Attachment: httperrors.patch

> return HTTP errors from HttpFetcher subclasses
> ----------------------------------------------
>
>                 Key: SHINDIG-309
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-309
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: httperrors.patch
>
>
> The current implementation of BasicHttpFetcher fails if a server returns a 40x or 50x return code.  An exception gets thrown, which in turn is turned into a hard coded HTTP 500 response.
> This patch tweaks the code to allow the real response to be returned.
> This is prep work for supporting the OAuth problem reporting extension, to be shortly followed by the Scalable OAuth extension.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SHINDIG-309) return HTTP errors from HttpFetcher subclasses

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Eaton resolved SHINDIG-309.
---------------------------------

    Resolution: Fixed

Fixed in revision 664209.

> return HTTP errors from HttpFetcher subclasses
> ----------------------------------------------
>
>                 Key: SHINDIG-309
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-309
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: httperrors2.patch
>
>
> The current implementation of BasicHttpFetcher fails if a server returns a 40x or 50x return code.  An exception gets thrown, which in turn is turned into a hard coded HTTP 500 response.
> This patch tweaks the code to allow the real response to be returned.
> This is prep work for supporting the OAuth problem reporting extension, to be shortly followed by the Scalable OAuth extension.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-309) return HTTP errors from HttpFetcher subclasses

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Eaton updated SHINDIG-309:
--------------------------------

    Attachment:     (was: httperrors.patch)

> return HTTP errors from HttpFetcher subclasses
> ----------------------------------------------
>
>                 Key: SHINDIG-309
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-309
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>
> The current implementation of BasicHttpFetcher fails if a server returns a 40x or 50x return code.  An exception gets thrown, which in turn is turned into a hard coded HTTP 500 response.
> This patch tweaks the code to allow the real response to be returned.
> This is prep work for supporting the OAuth problem reporting extension, to be shortly followed by the Scalable OAuth extension.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-309) return HTTP errors from HttpFetcher subclasses

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599955#action_12599955 ] 

Brian Eaton commented on SHINDIG-309:
-------------------------------------

Fair comment, but it's largely irrelevant to this patch.  Any objection to the http fetcher interface being defined as returning the response body for 40x and 50x server errors?

> return HTTP errors from HttpFetcher subclasses
> ----------------------------------------------
>
>                 Key: SHINDIG-309
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-309
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: httperrors.patch
>
>
> The current implementation of BasicHttpFetcher fails if a server returns a 40x or 50x return code.  An exception gets thrown, which in turn is turned into a hard coded HTTP 500 response.
> This patch tweaks the code to allow the real response to be returned.
> This is prep work for supporting the OAuth problem reporting extension, to be shortly followed by the Scalable OAuth extension.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.