christophd/citrus — Issue #17: Problem in acknowledgement received after sending the HTTP request
Author: mangeshs
Created: 2012-02-08 11:45:59+00:00
State: open

Hi,

I am using Citrus for testing HTTP interface of my application.
I am using "citrus:http-message-sender" along with "send" action in test XML. This send action waits for the HTTP 200 code from the server to verify the success/failure of message send.
What happens is when the response returns from my application, the HTTP header extraction takes place in HttpMessageSender class (code snippet from the class)

Map httpResponseHeaders = headerMapper.toHeaders(response.getHeaders());
Map customHeaders = new HashMap();
for (Entry> header : response.getHeaders().entrySet()) {
if (!httpResponseHeaders.containsKey(header.getKey())) {
customHeaders.put(header.getKey(), StringUtils.collectionToCommaDelimitedString(header.getValue()));
}
}

Now this, "response.getHeaders()" is giving an exception "Cannot parse date value "0" for expires header " because of the value set by my application in the Expires header.

So can I somehow control this HTTP header extraction to only check certain mandatory HTTP headers and ignore others? As I just want to validate if the HTTP 200 code is returned or not and I don't want the validation of headers like expires.