Closed (fixed)
Project:
Services
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Apr 2013 at 18:33 UTC
Updated:
25 Apr 2013 at 09:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
ygerasimov commented@lhridley can you advise when you get HTML in your error message? How I can reproduce this problem?
Comment #2
lisa.rae commentedSure. I've got a RESTful server accepting JSON set up, and when I submit a request to register an account that is a duplicate name or email, I get HTML returned. For example, a request as follows:
Content-Type: application/json
Method: POST
Endpoint: /user/register.json
Body:
Returns the following header response:
This is just one example. Basically any error that is normally returned in drupal_set_message() that has HTML that we are instead returning in the Status Code header needs to have the HTML tags stripped before they are returned.
Comment #3
ygerasimov commentedThanks for the example. Here is patch.
Comment #5
ygerasimov commented#3: services-1966942-strip-tags-error-message-status.patch queued for re-testing.
Comment #7
ygerasimov commented#3: services-1966942-strip-tags-error-message-status.patch queued for re-testing.
Comment #8
ygerasimov commentedI have committed patch #3. Thanks.