Permalink
Browse files

JSFUNIT-277 JSFUnitHttpRequest is not caching enough. Causes StackOve…

…rflow.

git-svn-id: https://svn.jboss.org/repos/jsfunit/trunk@575 992343fe-802f-0410-85da-d31fbad5f0a6
  • Loading branch information...
1 parent 8ebbb2b commit 8b6b983fe7ac3d1d751ead29b8c9a06583db5120 @ssilvert ssilvert committed Apr 26, 2011
@@ -92,6 +92,11 @@
private boolean isRequestedSessionIdFromURL;
private boolean isRequestedSessionIdValid;
private boolean isSecure;
+ private Locale locale;
+ private String authType;
+ private String characterEncoding;
+ private String contentType;
+ private String contextPath;
public JSFUnitHttpServletRequest(JSFUnitExternalContext extCtx, HttpServletRequest request)
{
@@ -117,6 +122,11 @@ public JSFUnitHttpServletRequest(JSFUnitExternalContext extCtx, HttpServletReque
this.isRequestedSessionIdFromURL = request.isRequestedSessionIdFromURL();
this.isRequestedSessionIdValid = request.isRequestedSessionIdValid();
this.isSecure = request.isSecure();
+ this.locale = request.getLocale();
+ this.authType = request.getAuthType();
+ this.characterEncoding = request.getCharacterEncoding();
+ this.contentType = request.getContentType();
+ this.contextPath = request.getContextPath();
}
private boolean isServlet24OrGreater()
@@ -200,7 +210,7 @@ private Enumeration makeEnumeration(Iterator iterator)
@Override
public Locale getLocale()
{
- return this.extCtx.getRequestLocale();
+ return this.locale;
}
@Override
@@ -212,13 +222,13 @@ public Enumeration getAttributeNames()
@Override
public String getAuthType()
{
- return this.extCtx.getAuthType();
+ return this.authType;
}
@Override
public String getCharacterEncoding()
{
- return this.extCtx.getRequestCharacterEncoding();
+ return this.characterEncoding;
}
@Override
@@ -230,13 +240,13 @@ public int getContentLength()
@Override
public String getContentType()
{
- return this.extCtx.getRequestContentType();
+ return this.contentType;
}
@Override
public String getContextPath()
{
- return this.extCtx.getRequestContextPath();
+ return this.contextPath;
}
@Override

0 comments on commit 8b6b983

Please sign in to comment.