[Groonga-commit] groonga/gcs [master] Set content type to the response of configuration API

Back to archive index

null+****@clear***** null+****@clear*****
2012年 6月 21日 (木) 15:31:26 JST


SHIMODA Hiroshi	2012-06-21 15:31:26 +0900 (Thu, 21 Jun 2012)

  New Revision: e4cee83e15ef95d04f1ae82afd9db1cd85468510
  https://github.com/groonga/gcs/commit/e4cee83e15ef95d04f1ae82afd9db1cd85468510

  Log:
    Set content type to the response of configuration API

  Modified files:
    lib/api/2011-02-01/configuration.js

  Modified: lib/api/2011-02-01/configuration.js (+5 -0)
===================================================================
--- lib/api/2011-02-01/configuration.js    2012-06-21 15:28:44 +0900 (198d6eb)
+++ lib/api/2011-02-01/configuration.js    2012-06-21 15:31:26 +0900 (fa0b486)
@@ -83,6 +83,7 @@ handlers.CreateDomain = function(database, request, response) {
     })
     .next(function(data) {
       var host = getBaseDomain(request.headers.host);
+      response.contentType('application/xml');
       response.send(createCreateDomainResponse({
         domainName: domain.name,
         domainId: FAKE_DOMAIN_ID,
@@ -145,6 +146,7 @@ exports.createHandler = function(database) {
       message = 'An input parameter "Version" that is mandatory for ' +
                 'processing the request is not supplied.';
       body = createCommonErrorResponse('MissingParameter', message);
+      response.contentType('application/xml');
       return response.send(body, 400);
     }
 
@@ -152,6 +154,7 @@ exports.createHandler = function(database) {
       message = 'A bad or out-of-range value "' + version + '" was supplied ' +
                 'for the "Version" input parameter.';
       body = createCommonErrorResponse('InvalidParameterValue', message);
+      response.contentType('application/xml');
       return response.send(body, 400);
     }
 
@@ -159,12 +162,14 @@ exports.createHandler = function(database) {
     if (!action) {
       message = 'The request is missing an action or operation parameter.';
       body = createCommonErrorResponse('MissingAction', message);
+      response.contentType('application/xml');
       return response.send(body, 400);
     }
 
     if (!(action in handlers)) {
       message = 'The action ' + action + ' is not valid for this web service.';
       body = createCommonErrorResponse('InvalidAction', message);
+      response.contentType('application/xml');
       return response.send(body, 400);
     }
 
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Download 



Groonga-commit メーリングリストの案内
Back to archive index