-3

i have an Apache server (apache 2.2) installed on an ubuntu server.

the ubuntu is ubuntu quantal that sits on amazon ec2.

that server receives xml requests as post data and returns xml response in it's body. simple as that.

sometimes costumers complain that they get in the body HTTP_STATUS_ERROR Of 201 instead of the xml response.

maybe i missed something but i couldn't find anything in the logs.

what am i missing ?

http status of 201 is ACCEPTED instead of OK, why is that ?

any information regarding the issue would be greatly appreciated.

thank you

2
  • oops.. ok so it's CREATED.. i have a typo :)
    – ufk
    Jun 9, 2013 at 13:16
  • 1
    2XX indicates a success, 4XX and 5XX are errors. Based on the information you have provided, we cannot explain why you are sometimes seeing 201 instead of 200.
    – Andrew B
    Jun 9, 2013 at 16:57

1 Answer 1

2

A 201 is Created not Accepted http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

10.2.2 201 Created

The request has been fulfilled and resulted in a new resource being created. The newly created resource can be referenced by the URI(s) returned in the entity of the response, with the most specific URI for the resource given by a Location header field. The response SHOULD include an entity containing a list of resource characteristics and location(s) from which the user or user agent can choose the one most appropriate. The entity format is specified by the media type given in the Content-Type header field. The origin server MUST create the resource before returning the 201 status code. If the action cannot be carried out immediately, the server SHOULD respond with 202 (Accepted) response instead.

The server seems to be indicating it has successfully handled your post request.

You should probably speak to the developer of whatever it is that is returning the 201 and get them to debug and 'fix' it is appropriate.

1
  • i am the developer and i can't figure out why sometimes this is the return status.
    – ufk
    Jun 9, 2013 at 13:20

Not the answer you're looking for? Browse other questions tagged .