harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6561) [classlib][luni]HttpConnection should not throw a IOException if the server return 401 but does not provide a WWW-Authenticate header.
Date Mon, 28 Jun 2010 08:56:50 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883073#action_12883073
] 

Mark Hindess commented on HARMONY-6561:
---------------------------------------

Looking at the test case, it doesn't seem unreasonable behaviour given that the HTTP request/response
has worked correctly.  I'd probably only expect an IOException if the response was syntactically
invalid/incomplete but in this case the response is complete.  The application has visibility
of the response code and (lack of) headers so it can decide what to do about it.

If you threw an IOException then it would be impossible for the application to handle this
specific situation (in a legitimate but non-standard way for example) because they'd not be
able to distinguish this case from any other.

Charles, in future, can you remove the println's from the tests before submitting a patch.
We try to avoid verbose output from tests. Thanks.


> [classlib][luni]HttpConnection should not throw a IOException if the server return 401
but does not provide a WWW-Authenticate header.
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6561
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6561
>             Project: Harmony
>          Issue Type: Bug
>         Environment: All
>            Reporter: Li Jing Qin
>         Attachments: HARMONY-6561.diff
>
>
> When the server return a 401(UNAUTHORIZED), it supposed to provide a "WWW-Authenticate"
header. But if it is not provided, we should not throw a IOException. See the details in testcase.

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


Mime
View raw message