Skip to content

Commit

Permalink
Don't use \S in regex to avoid stackoverflow bug in underlying library.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alon Pe'er committed Jul 21, 2016
1 parent 908b369 commit cb91605
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ public PactFragment createFragment(PactDslWithProvider builder) {
.matchHeader(CONTENT_TYPE, APPLICATION_JSON, APPLICATION_JSON_CHARSET_UTF_8)
.willRespondWith()
.status(201)
.matchHeader("Location", "http(s)?://\\S+:\\d+//some-service/user/\\S{36}$")
.matchHeader("Location", "http(s)?://\\w+:\\d+//some-service/user/\\w{36}$")
.given("An automation user with id: " + EXPECTED_USER_ID)
.uponReceiving("existing user lookup")
.path(SOME_SERVICE_USER + EXPECTED_USER_ID)
.method("GET")
.matchHeader("Content-Type", "application/json.*", APPLICATION_JSON_CHARSET_UTF_8)
.matchHeader("Content-Type", APPLICATION_JSON, APPLICATION_JSON_CHARSET_UTF_8)
.willRespondWith()
.status(200)
.matchHeader("Content-Type", "application/json.*", APPLICATION_JSON_CHARSET_UTF_8)
.matchHeader("Content-Type", APPLICATION_JSON, APPLICATION_JSON_CHARSET_UTF_8)
.body(getUser())
.toFragment();
}
Expand Down

0 comments on commit cb91605

Please sign in to comment.