cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eoghan Glynn (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-434) Handle 401 explicitly in HTTPConduit.handleResponse()
Date Thu, 22 Feb 2007 17:35:05 GMT
Handle 401 explicitly in HTTPConduit.handleResponse()
-----------------------------------------------------

                 Key: CXF-434
                 URL: https://issues.apache.org/jira/browse/CXF-434
             Project: CXF
          Issue Type: Sub-task
          Components: Transports
            Reporter: Eoghan Glynn
         Assigned To: Eoghan Glynn


If a 401 challenge is received this could be handled explicitly in HTTPConduit.handleResponse()
(instead of relying on the JVM-wide java.net.Authenticator instance).

The logic should include the following steps:

1. check if the last request payload was cached, on the basis of the content of type OutputStream.class
set on the corresponding outMessage

2. if only a standard WrappedOutputStream is set as the message content, then a transparent
resend is not possible and an exception should be thrown up to the application

3. if on the other hand, a fully caching output stream is there, then the last payload is
available for resend, which may be acheived as follows:
3a. increment the number of transparent resends we've done for this targetURI
3b. get the HttpURLConnection from the previous outMessage via the HTTP_CONNECTION property
3c. if the threshold for the number of transparent resends has beend reached, then turn back
on chunking on the HttpURLConnection, unless config has explicitly turned this off permanently
3d. call HTTP.send() again on the old outMessage to set the content to a fresh output stream
3e. copy the cached request payload onto the new output stream and flush() & close() the
stream


-- 
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