osgi / bugzilla-archive

Archive of OSGi Alliance Specification Bugzilla bugs. The Specification Bugzilla system was decommissioned with the move to GitHub. The issues in this repository are imported from the Specification Bugzilla system for archival purposes.
0 stars 1 forks source link

[http whiteboard] test_table_140_5_HTTP_WHITEBOARD_FILTER_REGEX regex "/.*" expects not to match URI "/" #2978

Closed bjhargrave closed 5 years ago

bjhargrave commented 5 years ago

Original bug ID: BZ#3110 From: @rotty3000 Reported version: R6

bjhargrave commented 5 years ago

Comment author: @rotty3000

[Regarding R6 spec]

Test Case

org.osgi.test.cases.http.whiteboard.junit.FilterTestCase.test_table_140_5_HTTP_WHITEBOARD_FILTER_REGEX()

Sets a filter with the following regex: "/.*"

then expect it to match:

/a /a.html /some/path/b.html

but not

/

As far as I can tell, the assertion:

assertTrue(Pattern.compile("/.*").matcher("/").matches());

is true. I can't find any specific mention in the spec for a special case for "/" w.r.t. regex.

bjhargrave commented 5 years ago

Comment author: @rotty3000

if the regex was "/.+" then sure...

bjhargrave commented 5 years ago

Comment author: @rotty3000

EEG: agreed on proposed solution

bjhargrave commented 5 years ago

Comment author: @rotty3000

See 3a383a41152eed6260be409f014ab857235fbbec