-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Match.Regex returning 500 when used in WithHeader #420
Comments
Can you please share the full DEBUG level logs for this? |
|
So the error is that the actual header doesn't match the expected one (it has a different date). Since you've used a Matcher instead of a literal value then you'd expect that to work, but looks like it's matching literally. |
PactNer serialises the Matcher properly and submits it to pactffi, so it looks like this is a bug in pactffi to me pact-net/src/PactNet/RequestBuilder.cs Line 352 in a16fac3
|
I wonder if this is caused by pact-foundation/pact-reference#214 The regex library on pactffi is known to be a bit quirky with inputs with partial overlaps, which all ISO dates are very likely to have since they start with the year. |
I can confirm I have reproduced this exact same issue on pactnet 4.2.0+. Match.Type also fails for request headers, and for simple strings such as host - does not have to be using date time regex. *This issue does not occur in pactnet 4.1.0 SUCCESSFUL: FAILS: Response (Failure clue from debug log): |
I experienced the same issue. It worked for me with pactnet 4.1.0 as well. |
Raised upstream issue: pact-foundation/pact-reference#238 |
Could be that this is already fixed? At least my test is not failing anymore. #433 |
Yeah we've upgraded FFI since then so there's definitely a chance it was
fixed. If you do any more testing and decide this works now then feel free
to close.
…On Tue, 29 Aug 2023, 06:53 vcalatayud, ***@***.***> wrote:
Could be that this is already fixed? At least my test is not failing
anymore. #433 <#433>
—
Reply to this email directly, view it on GitHub
<#420 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD4FKU3K6E4BEXLUS2TRSTXXV7U3ANCNFSM6AAAAAARH76IXQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Following the tutorial for implementing V3, I found that the client returns an internal server error when trying to use a regex matcher in the header. Seems like it's not working as expected (based in what I've seen from the guide)
Here is the code example
Test implementation:
Client:
Error:
The text was updated successfully, but these errors were encountered: