Refactoring of the handle method of RESTServer.

There is no need to extract $leaf and then put it back in to $path when we determine formatter.

Attached patch shows shorter way.

Comments

kylebrowning’s picture

Status: Needs review » Needs work

This patch doesn't apply either, ARG

ygerasimov’s picture

Status: Needs work » Needs review
StatusFileSize
new1.58 KB
new2.33 KB

Here are both patches for D6 and D7.

marcingy’s picture

StatusFileSize
new2.22 KB

Tests are failing

ygerasimov’s picture

There was failing test on D6. Thanks for catch @marcingy.

I have added test of testEndpointMenu() to D7 like is in D6 for consistency.

Now all tests pass. There are several exceptions, but they are not connected with these changes anyway.

kylebrowning’s picture

Status: Needs review » Reviewed & tested by the community

These look great. Tests pass for me.

ygerasimov’s picture

Status: Reviewed & tested by the community » Fixed

Committed to both 6.x and 7.x branches. Thank you for review!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.