Ask a Question

Smart Assertions - Metadata and case sensitive header names

SOLVED
vorokai
Occasional Contributor

Smart Assertions - Metadata and case sensitive header names

Smart Assertions - Metadata and case sensitive header names

 

I've recently have found out that smart assertions seems to be case sensitive to header name. For example there are two web-servers. Both of them sends the same response header but one sends it like 'Access-Control-Allow-Origin' and another like 'access-control-allow-origin'. Such difference brings different results: for one web-server it passes successfully, and for the other it fails. 

Is there any thoughts or existing request about adding an option for header name case sensitivity (like for values) in "Smart Assertion"?

1 ACCEPTED SOLUTION

Accepted Solutions
mattb
Staff

Re: Smart Assertions - Metadata and case sensitive header names

I would recommend a support ticket at this time: https://support.smartbear.com/readyapi/message/

View solution in original post

6 REPLIES 6
mattb
Staff

Re: Smart Assertions - Metadata and case sensitive header names

Hi,

In the smart assertion there is a Case Sensitive checkbox, I would just uncheck that node for your validations: 

https://support.smartbear.com/readyapi/docs/testing/assertions/reference/property/smart-assertion.ht...l

vorokai
Occasional Contributor

Re: Smart Assertions - Metadata and case sensitive header names

@mattb I am afraid it is not what I am looking for.

I am talking about access to header via it "name" and not about header "value" comparison (where case-sensitive checkbox is present and works as expected)

If two requests return response headers with different case registry - smart assertion does not work correctly.

 

Web server 1 returns:  Access-Control-Allow-Origin

Web server 2 returns:  access-control-allow-origin

 

In this case, smart assertion that was set to get "Access-Control-Allow-Origin" will fail to do so for "access-control-allow-origin"

Here the screenshot of the real example:

 smart_assertion_2021-12-07_18-59.png

mattb
Staff

Re: Smart Assertions - Metadata and case sensitive header names

Ok, so the header name is what has the case-sensitivity, not the header value, correct?

vorokai
Occasional Contributor

Re: Smart Assertions - Metadata and case sensitive header names

Yes, also added the screenshot to the previous post.

mattb
Staff

Re: Smart Assertions - Metadata and case sensitive header names

I would recommend a support ticket at this time: https://support.smartbear.com/readyapi/message/

View solution in original post

vorokai
Occasional Contributor

Re: Smart Assertions - Metadata and case sensitive header names

Thanks for the reply @mattb.

Created support ticket.

cancel
Showing results for 
Search instead for 
Did you mean: