[wp-trac] [WordPress Trac] #39889: Improve/Fix REST Response on Multisite when an endpoint for a non-existent site is hit.

WordPress Trac noreply at wordpress.org
Thu Feb 16 15:52:56 UTC 2017


#39889: Improve/Fix REST Response on Multisite when an endpoint for a non-existent
site is hit.
---------------------------------+-----------------------------
 Reporter:  nerrad               |      Owner:
     Type:  defect (bug)         |     Status:  new
 Priority:  normal               |  Milestone:  Awaiting Review
Component:  REST API             |    Version:  4.7
 Severity:  normal               |   Keywords:
  Focuses:  multisite, rest-api  |
---------------------------------+-----------------------------
 Currently if you hit the endpoint for a domain on a site that doesn't
 exist it will behave the same as on a normal request.

 - visit https://nonexistentsubdomain.eventsmart.com/wp-json in a REST
 client.
 - Take note of the "Location" header in the response:
 https://eventsmart.com/wp-signup.php?new=nonexistentsite.  It's also
 returned with a HTTP 302

 Granted this is kind of edgecase, but I think it'd be better to handle
 things a bit better on REST requests.  The question is how?  I think from
 the standpoint of the REST client it'd be better to just return a 404 and
 a "site doesnt' exist" message (or something to that affect).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39889>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list