You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Akitoshi Yoshida (JIRA)" <ax...@ws.apache.org> on 2008/08/15 11:09:44 UTC

[jira] Updated: (AXIS-2757) SimpleAxisWorker to return HTTP 401 for AxisFault with Server.Unauthenticated and Server.Unauthorized

     [ https://issues.apache.org/jira/browse/AXIS-2757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Akitoshi Yoshida updated AXIS-2757:
-----------------------------------

    Description: 
org.apache.axis.handlers.SimpleAuthencationHandler returns the fault code Server.Unauthentication when no valid user is given.
Currently, this leads to an HTTP 500 error at SimpleAxisWorker, as it checks only for Server.Unauthorized but not for Server.Unauthenticated.

In contrast,  org.apache.axis.transport.http.AxisServlet handles both codes correctly and returns HTTP 401 with WWW-Anthenticate header.

We request SimpleAxisWorker to be modified as below so that it can handle this fault code correctly.(analogues to what is done in AxisServlet).

The diff was generated from the nightly build source.

453c453
<                     } else if ("Server.Unauthorized".equals(af.getFaultCode().getLocalPart())) {
---
>                     } else if (faultCode.getLocalPart().startsWith("Server.Unauth") {
491a492,494
>             if (status == UNAUTH) {
>             	out.write("\r\nWWW-Authenticate: Basic Realm=\"Axis\"".getBytes());
>             }

Thank you.
Regards, Aki

  was:
org.apache.axis.handlers.SimpleAuthencationHandler returns the fault code Server.Unauthentication when no valid user is given.
Currently, this leads to an HTTP 500 error at SimpleAxisWorker, as it checks only for Server.Unauthorized but not for Server.Unauthenticated.

In contrast,  org.apache.axis.transport.http.AxisServlet handles both codes correctly and returns HTTP 401 with WWW-Anthenticate header.

We request SimpleAxisWorker to be modified as below so that it can handle this fault code correctly.(analogues to what is done in AxisServlet).

The diff was generated from the nightly build source.

453c453
<                     } else if ("Server.Unauthorized".equals(af.getFaultCode().getLocalPart())) {
---
>                     } else if (faultCode.startsWith("Server.Unauth") {
491a492,494
>             if (status == UNAUTH) {
>             	out.write("\r\nWWW-Authenticate: Basic Realm=\"Axis\"".getBytes());
>             }

Thank you.
Regards, Aki


> SimpleAxisWorker to return HTTP 401 for AxisFault with Server.Unauthenticated and Server.Unauthorized
> -----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS-2757
>                 URL: https://issues.apache.org/jira/browse/AXIS-2757
>             Project: Axis
>          Issue Type: Bug
>    Affects Versions: current (nightly)
>         Environment: JDK 1.4
>            Reporter: Akitoshi Yoshida
>            Priority: Minor
>             Fix For: current (nightly)
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> org.apache.axis.handlers.SimpleAuthencationHandler returns the fault code Server.Unauthentication when no valid user is given.
> Currently, this leads to an HTTP 500 error at SimpleAxisWorker, as it checks only for Server.Unauthorized but not for Server.Unauthenticated.
> In contrast,  org.apache.axis.transport.http.AxisServlet handles both codes correctly and returns HTTP 401 with WWW-Anthenticate header.
> We request SimpleAxisWorker to be modified as below so that it can handle this fault code correctly.(analogues to what is done in AxisServlet).
> The diff was generated from the nightly build source.
> 453c453
> <                     } else if ("Server.Unauthorized".equals(af.getFaultCode().getLocalPart())) {
> ---
> >                     } else if (faultCode.getLocalPart().startsWith("Server.Unauth") {
> 491a492,494
> >             if (status == UNAUTH) {
> >             	out.write("\r\nWWW-Authenticate: Basic Realm=\"Axis\"".getBytes());
> >             }
> Thank you.
> Regards, Aki

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org