[Httpunit-commit] CVS: httpunit/src/com/meterware/servletunit ServletUnitHttpRequest.java,1.19,1.20
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2003-02-04 19:18:07
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/servletunit
In directory sc8-pr-cvs1:/tmp/cvs-serv28379/src/com/meterware/servletunit
Modified Files:
ServletUnitHttpRequest.java
Log Message:
Add ServletUnit support for https protocol
Index: ServletUnitHttpRequest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/ServletUnitHttpRequest.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ServletUnitHttpRequest.java 3 Jan 2003 16:12:35 -0000 1.19
+++ ServletUnitHttpRequest.java 4 Feb 2003 19:17:32 -0000 1.20
@@ -2,7 +2,7 @@
/********************************************************************************************************************
* $Id$
*
-* Copyright (c) 2000-2002, Russell Gold
+* Copyright (c) 2000-2003, Russell Gold
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
@@ -45,7 +45,8 @@
private ServletInputStreamImpl _inputStream;
private String _contentType;
- private Vector _locales;
+ private Vector _locales;
+ private boolean _secure;
/**
@@ -59,6 +60,7 @@
_headers.addEntries( clientHeaders );
_headers.addEntries( request.getHeaders() );
_messageBody = messageBody;
+ _secure = request.getURL().getProtocol().equalsIgnoreCase( "https" );
_contentType = (String) _headers.get( "Content-Type" );
if (context == null) throw new IllegalArgumentException( "Context must not be null" );
@@ -492,7 +494,7 @@
* Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.
**/
public boolean isSecure() {
- throw new RuntimeException( "isSecure not implemented" );
+ return _secure;
}
|