// Set content type
MessageBytes contentType = MessageBytes.newInstance();
- contentType.setString("application/x-www-form-urlencoded");
+
+ //If no content type specified, use default for POST
+ String savedContentType = saved.getContentType();
+ if (savedContentType == null) {
+ savedContentType = "application/x-www-form-urlencoded";
+ }
+
+ contentType.setString(savedContentType);
request.getCoyoteRequest().setContentType(contentType);
}
}
while ( (bytesRead = is.read(buffer) ) >= 0) {
body.append(buffer, 0, bytesRead);
}
+ saved.setContentType(request.getContentType());
saved.setBody(body);
}
public void setBody(ByteChunk body) {
this.body = body;
}
+
+ /**
+ * The content type of the request, used if this is a POST.
+ */
+ private String contentType = null;
+
+ public String getContentType() {
+ return (this.contentType);
+ }
+
+ public void setContentType(String contentType) {
+ this.contentType = contentType;
+ }
}
</properties>
<body>
+<section name="Tomcat 6.0.14 (remm)">
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ <bug>42361</bug>: Handle multi-part forms when saving requests during
+ FORM authentication process. Patch provided by Peter Runge. (markt)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
<section name="Tomcat 6.0.13 (remm)">
<subsection name="Catalina">
<changelog>