ASF Bugzilla – Attachment 19388 Details for
Bug 37466
c:import doesn't work with HEAD requests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix the issue.
37466-fix.patch (text/plain), 1.88 KB, created by
Henri Yandell
on 2007-01-10 14:08:07 UTC
(
hide
)
Description:
Patch to fix the issue.
Filename:
MIME Type:
Creator:
Henri Yandell
Created:
2007-01-10 14:08:07 UTC
Size:
1.88 KB
patch
obsolete
>Index: src/org/apache/taglibs/standard/tag/common/core/ImportSupport.java >=================================================================== >--- src/org/apache/taglibs/standard/tag/common/core/ImportSupport.java (revision 494977) >+++ src/org/apache/taglibs/standard/tag/common/core/ImportSupport.java (working copy) >@@ -36,6 +36,7 @@ > import javax.servlet.ServletException; > import javax.servlet.ServletOutputStream; > import javax.servlet.http.HttpServletRequest; >+import javax.servlet.http.HttpServletRequestWrapper; > import javax.servlet.http.HttpServletResponse; > import javax.servlet.http.HttpServletResponseWrapper; > import javax.servlet.jsp.JspException; >@@ -291,9 +292,13 @@ > new ImportResponseWrapper( > (HttpServletResponse) pageContext.getResponse()); > >+ ImportRequestWrapper wrappedRequest = >+ new ImportRequestWrapper( >+ (HttpServletRequest) pageContext.getRequest()); >+ > // spec mandates specific error handling form include() > try { >- rd.include(pageContext.getRequest(), irw); >+ rd.include(wrappedRequest, irw); > } catch (IOException ex) { > throw new JspException(ex); > } catch (RuntimeException ex) { >@@ -312,6 +317,8 @@ > stripSession(targetUrl)); > } > >+System.err.println("RETURN: " + irw.getString()); >+ > // recover the response String from our wrapper > return irw.getString(); > } >@@ -370,6 +377,19 @@ > } > } > >+ /** Wraps requests to allow us to enforce the method to be GET */ >+ private class ImportRequestWrapper extends HttpServletRequestWrapper { >+ >+ public ImportRequestWrapper(HttpServletRequest request) { >+ super(request); >+ } >+ >+ public String getMethod() { >+ return "GET"; >+ } >+ >+ } >+ > /** Wraps responses to allow us to retrieve results as Strings. */ > private class ImportResponseWrapper extends HttpServletResponseWrapper { >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 37466
:
16947
|
16948
|
19364
| 19388