Introduction HTTP status codes

90 Copyright © 2010 Open Geospatial Consortium, Inc.

11.7 HTTP responses

11.7.1 Introduction

Upon receiving a valid operation request, the service shall send a response corresponding exactly to the request as detailed in the Implementation Specification, or send an exception report if unable to respond correctly. Only in the case of Version Negotiation Subclause 7.3.2 may the server return a differing result. Upon receiving an invalid request, the service shall issue an exception report as specified in Clause 8. NOTE 1 As a practical matter, a client should be prepared to receive either a valid result, or nothing, or any other result. This is because the client may have formed a non-conforming request that inadvertently triggered a reply by something other than an OWS, because the server may be non-conforming, etc.

11.7.2 HTTP status codes

A successful response to a valid request must include a 200 HTTP status code. A response containing an exception report must include an HTTP status code as detailed in Table 26 in subclause 8.6. Clients must recognize and handle the 200 status code as well as those listed in Table 26. Clients should recognize and handle other HTTP status codes as well, e.g., HTTP redirect codes 301, 302, 307. Though clients do not need to understand all status codes they must according to the HTTP specification [IETF RFC 2616], section 6.1.1 understand that class of any response code. For instance, if a client receives a status code 401 but does not understand that code it must handle that response as a 4xx ―Client Error‖. A server may send an HTTP Redirect message using HTTP response codes as defined in [IETF RFC 2616] to an absolute URL that is different from the valid request URL that was sent by the client. HTTP Redirect causes the client to issue a new HTTP request for the new URL. Several redirects could in theory occur. Practically speaking, the redirect sequence ends when the server responds with an operation response. The final response shall be an OWS operation response that corresponds exactly to the original operation request or an exception report. Servers may send other HTTP status codes defined in [IETF RFC 2616] as appropriate for the situation and with appropriate HTTP response headers and HTTP response body as specified for the HTTP status code being returned.

11.7.3 HTTP Response body