Author: wsobel
Date: Sun Mar 15 17:32:09 2009
New Revision: 754698
URL: http://svn.apache.org/viewvc?rev=754698&view=rev
Log:
Fix for OLIO-59: Auth token not in some memcached forms. Make it optional
Modified:
incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/driver/UIDriver.java
Modified:
incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/driver/UIDriver.java
URL:
http://svn.apache.org/viewvc/incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/driver/UIDriver.java?rev=754698&r1=754697&r2=754698&view=diff
==============================================================================
---
incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/driver/UIDriver.java
(original)
+++
incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/driver/UIDriver.java
Sun Mar 15 17:32:09 2009
@@ -549,8 +549,8 @@
// Parse the authenticity_token from the response
String token = parseAuthToken(responseBuffer);
-
- post.addParameter("authenticity_token", token);
+ if (token != null)
+ post.addParameter("authenticity_token", token);
doMultiPartPost(post, "Event was successfully created.");
@@ -750,8 +750,10 @@
int idx = responseBuffer.indexOf("authenticity_token");
- if (idx == -1)
- throw new IOException("Trying to add event but authenticity token
not found");
+ if (idx == -1) {
+ logger.info("Trying to add event but authenticity token not
found");
+ return null;
+ }
int endIdx = responseBuffer.indexOf("\" />", idx);