You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "fred b (JIRA)" <ji...@apache.org> on 2012/06/28 14:51:42 UTC
[jira] [Comment Edited] (CXF-4398) Handling of 303 redirections
[ https://issues.apache.org/jira/browse/CXF-4398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13403057#comment-13403057 ]
fred b edited comment on CXF-4398 at 6/28/12 12:50 PM:
-------------------------------------------------------
Index: src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
===================================================================
--- src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (révision 1334068)
+++ src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (copie de travail)
@@ -982,6 +982,7 @@
switch(responseCode) {
case HttpURLConnection.HTTP_MOVED_PERM:
case HttpURLConnection.HTTP_MOVED_TEMP:
+ case HttpURLConnection.HTTP_SEE_OTHER: // 303
case 307:
connection = redirectRetransmit(origConnection, message, cachedStream);
break;
@@ -1713,6 +1714,7 @@
switch (e.responseCode()) {
case HttpURLConnection.HTTP_MOVED_PERM: // 301
case HttpURLConnection.HTTP_MOVED_TEMP: // 302
+ case HttpURLConnection.HTTP_SEE_OTHER: // 303
case 307:
msg += " that returned location header '" + e.getLocation() + "'";
break;
was (Author: fredb):
Index: src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
===================================================================
--- src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (révision 1334068)
+++ src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (copie de travail)
@@ -982,6 +982,7 @@
switch(responseCode) {
case HttpURLConnection.HTTP_MOVED_PERM:
case HttpURLConnection.HTTP_MOVED_TEMP:
+ case HttpURLConnection.HTTP_SEE_OTHER: // 303 pour fullsix / c2gweb
case 307:
connection = redirectRetransmit(origConnection, message, cachedStream);
break;
@@ -1713,6 +1714,7 @@
switch (e.responseCode()) {
case HttpURLConnection.HTTP_MOVED_PERM: // 301
case HttpURLConnection.HTTP_MOVED_TEMP: // 302
+ case HttpURLConnection.HTTP_SEE_OTHER: // 303 pour fullsix / c2gweb
case 307:
msg += " that returned location header '" + e.getLocation() + "'";
break;
> Handling of 303 redirections
> -----------------------------
>
> Key: CXF-4398
> URL: https://issues.apache.org/jira/browse/CXF-4398
> Project: CXF
> Issue Type: Improvement
> Components: JAX-RS
> Affects Versions: 2.5
> Reporter: fred b
> Labels: cxf, redirect
>
> It appears that the HttpConduit class do not follow 303 HTTP_SEE_OTHER redirects. There is already a special case for 301,302 and 307 responses, but no extension mechanism for specific http status handling.
> A quick fix consists of adding the 303 code handling in HttpConduit.java, as done in the provided patch.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira